Skip to content

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

Merged
merged 3 commits into from
Jan 24, 2025
Merged

feat: galleries in search page #682

merged 3 commits into from
Jan 24, 2025

Conversation

alexgoff
Copy link
Contributor

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.

@alexgoff alexgoff requested a review from ericdrosas87 January 13, 2025 20:15
@alexgoff alexgoff self-assigned this Jan 13, 2025
@@ -107,7 +106,6 @@ const sectionMap = {
events: EventPageTemplate,
glossaryTerms: GlossaryPageTemplate,
news: NewsPageTemplate,
searchResults: SearchPageTemplate,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove from catch-all

Copy link
Contributor Author

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={
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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

@alexgoff alexgoff merged commit e9732b8 into develop Jan 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants