From ba31b32725842badae20cc1d9366ffa0dc9abbdb Mon Sep 17 00:00:00 2001 From: Mounir Dhahri Date: Wed, 11 Oct 2023 16:43:23 +0200 Subject: [PATCH] chore: define artist/artworks route --- src/app/Scenes/Artist/Artist.tsx | 1 - src/app/Scenes/Search/components/AutosuggestSearchResult.tsx | 2 +- src/app/routes.ts | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/Scenes/Artist/Artist.tsx b/src/app/Scenes/Artist/Artist.tsx index 0f1f66e7e8b..14546a3174e 100644 --- a/src/app/Scenes/Artist/Artist.tsx +++ b/src/app/Scenes/Artist/Artist.tsx @@ -217,7 +217,6 @@ export const defaultArtistVariables = () => ({ }) export const ArtistQueryRenderer: React.FC = (props) => { - console.log({ props }) const { artistID, categories, diff --git a/src/app/Scenes/Search/components/AutosuggestSearchResult.tsx b/src/app/Scenes/Search/components/AutosuggestSearchResult.tsx index 1410ec43823..4252228c707 100644 --- a/src/app/Scenes/Search/components/AutosuggestSearchResult.tsx +++ b/src/app/Scenes/Search/components/AutosuggestSearchResult.tsx @@ -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!) } diff --git a/src/app/routes.ts b/src/app/routes.ts index 6c536c781d7..86f07e5e730 100644 --- a/src/app/routes.ts +++ b/src/app/routes.ts @@ -138,6 +138,10 @@ function getDomainMap(): Record { ...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"`