NeoEntityX
NeoEntityX2w ago

Architecture help for search page

Hello, I would like some help w/ designing a search page that has two components: a search bar and a search results lists. I have already the docs for searching and paginations on Next.js's website. However my SearchBar component uses some useQuery hooks which causes issues w/ fetching the user. For instance, instead my SearchBar, I have 3 buttons, one of which, gets the user folders and lets the user add the search query a folder. However whenever this query is run, the user is returned null.
3 Replies
Convex Bot
Convex Bot2w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
erquhart
erquhart2w ago
Having trouble understanding what you're running into here, can you share some code that's not doing what's expected, and the expected vs actual outcome
NeoEntityX
NeoEntityXOP2w ago
I'm sorry for making my problem sound so complicated, essentially the problem was that some data for the authenticated user (in this case, a list of folder objects) was returning null. Your AI was able to help me with the problem and pointed me to the correct page - https://docs.convex.dev/auth/debug. So I made two components: AuthenticatedResultList & UnauthenticatedResultList for now. It's not the most ideal solution since a lot of code is duplicated between the two components. But I guess it works for now.

Did you find this page helpful?