Skip to content

Commit

Permalink
chore: define artist/artworks route
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri committed Oct 11, 2023
1 parent 516b43b commit ba31b32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/app/Scenes/Artist/Artist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ export const defaultArtistVariables = () => ({
})

export const ArtistQueryRenderer: React.FC<ArtistQueryRendererProps> = (props) => {
console.log({ props })
const {
artistID,
categories,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function navigateToResult(result: AutosuggestResult, props?: PassedProps) {
} else if (result.displayType === "Fair") {
navigateToEntity(result.href!, EntityType.Fair, SlugType.ProfileID)
} else if (result.__typename === "Artist") {
navigate(result.href!, { passProps: props })
navigate(`${result.href!}/artworks`, { passProps: props })
} else {
navigate(result.href!)
}
Expand Down
4 changes: 4 additions & 0 deletions src/app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ function getDomainMap(): Record<string, RouteMatcher[] | null> {
...params,
initialTab: "Insights",
})),
addRoute("/artist/:artistID/artworks", "Artist", (params) => ({
...params,
scrollToArtworksGrid: true,
})),
addRoute("/artist/:artistID/shows", "ArtistShows"),

// Routes `/artist/:artistID/*` and `"/:profile_id_ignored/artist/:artistID"`
Expand Down

0 comments on commit ba31b32

Please sign in to comment.