This fixes #10631. Originally the api basepath for the reindex button is resolved during plugin initialization. Looks like this happens before payload overrides the config with the `basePath `from the next config. I've changed it so that it uses the `useConfig` hook, and manually tested that it works. 
Payload Search Plugin
A plugin for Payload to generate records of your documents that are extremely fast to search on.