-
Notifications
You must be signed in to change notification settings - Fork 0
feat: galleries in search page #682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -107,7 +106,6 @@ const sectionMap = { | |||
events: EventPageTemplate, | |||
glossaryTerms: GlossaryPageTemplate, | |||
news: NewsPageTemplate, | |||
searchResults: SearchPageTemplate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove from catch-all
app/[locale]/search/page.tsx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implements what was previously the SearchPageTemplate
as a static route
return entry.id ? ( | ||
<Tile | ||
key={entry.id} | ||
image={entry.image?.[0]} | ||
image={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
show Canto assets in search results if available
uri | ||
} | ||
const query = gql` | ||
query getEntriesBySite($site: [String], $level: Int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since search pages aren't part of the catchall route anymore, they don't need to be part of it's static params generation
Add galleries to the search results page.
Includes refactor to the page itself. Previously it was a template served through the
[..uriSegments]
catch-all. I think that did not make sense for a one-off page that would always live at the same route/search
. I separated the search page into it's own static route so now the other pages don't bundle search code and search doesn't bundle code for other pages.