I am having an issue trying to get Algolia to run in my nextjs app. Specifically I am using a custom app component, _app, to initialize all pages and layouts. I would like to have search work on all or most of my pages and layotus, but in order to do that I need to add instantsearch and getInitialProps to _app and that is where things break down.
I have followed the example found here: Next.js instantsearch with server-side rendering (SSR) which was immensely helpful. I can get search to work on one page by following this example.
Here is a codesandbox to show the state of my work at the moment: determined-waterfall-j06ry - CodeSandbox
Can anyone show me where I’ve gone wrong?
My goal is just to have search in my navbar and for a search to redirect to my marketplace. I’d be all ears if anyone could suggest another way of doing that where I don’t have to mess with _app.