diff --git a/src/app/Navigation/routes.tsx b/src/app/Navigation/routes.tsx index b94e7ef5910..916faaa0476 100644 --- a/src/app/Navigation/routes.tsx +++ b/src/app/Navigation/routes.tsx @@ -1503,8 +1503,18 @@ export const artsyDotNetRoutes = defineRoutes([ path: "/:slug", name: "VanityURLEntity", Component: VanityURLEntityRenderer, + options: { + screenOptions: { + headerShown: false, + }, + }, }, - webViewRoute({ path: "/*" }), + webViewRoute({ + path: "/*", + screenOptions: { + headerShown: false, + }, + }), ]) export const liveDotArtsyRoutes = defineRoutes([ diff --git a/src/app/Scenes/HomeView/Sections/HomeViewSectionQuickLinks.tests.tsx b/src/app/Scenes/HomeView/Sections/HomeViewSectionQuickLinks.tests.tsx new file mode 100644 index 00000000000..9b12f5f1067 --- /dev/null +++ b/src/app/Scenes/HomeView/Sections/HomeViewSectionQuickLinks.tests.tsx @@ -0,0 +1,26 @@ +import { fireEvent, screen } from "@testing-library/react-native" +import { + HomeViewSectionQuickLinks, + Pills, +} from "app/Scenes/HomeView/Sections/HomeViewSectionQuickLinks" +import { navigate } from "app/system/navigation/navigate" +import { renderWithWrappers } from "app/utils/tests/renderWithWrappers" + +describe("HomeViewSectionQuickLinks", () => { + it("renders a list of pills", () => { + renderWithWrappers() + + Pills.forEach((pill) => { + expect(screen.getByText(pill.title)).toBeTruthy() + }) + }) + + it("navigates to the pill href", () => { + renderWithWrappers() + + Pills.forEach((pill) => { + fireEvent.press(screen.getByText(pill.title)) + expect(navigate).toHaveBeenCalledWith(pill.href) + }) + }) +}) diff --git a/src/app/Scenes/HomeView/Sections/HomeViewSectionQuickLinks.tsx b/src/app/Scenes/HomeView/Sections/HomeViewSectionQuickLinks.tsx new file mode 100644 index 00000000000..baf2befd02d --- /dev/null +++ b/src/app/Scenes/HomeView/Sections/HomeViewSectionQuickLinks.tsx @@ -0,0 +1,49 @@ +import { Pill, Spacer, Text, useSpace } from "@artsy/palette-mobile" +import { navigate } from "app/system/navigation/navigate" +import { FlatList } from "react-native-gesture-handler" + +export const HomeViewSectionQuickLinks: React.FC<{}> = () => { + const space = useSpace() + + return ( + } + renderItem={({ item: pill }) => ( + { + navigate(pill.href) + }} + > + + {pill.title} + + + )} + /> + ) +} + +type QuickLinkPill = { + title: string + href: string +} + +export const Pills: Array = [ + { title: "Follows", href: "/favorites" }, + { title: "Auctions", href: "/auctions" }, + { title: "Saves", href: "/favorites/saves" }, + { title: "Art under $1000", href: "/collect?price_range=%2A-1000" }, + { title: "Price Database", href: "/price-database" }, + { title: "Editorial", href: "/news" }, +] diff --git a/src/app/store/config/features.ts b/src/app/store/config/features.ts index 1763c16623d..93d61a3db0e 100644 --- a/src/app/store/config/features.ts +++ b/src/app/store/config/features.ts @@ -258,6 +258,11 @@ export const features = { showInDevMenu: true, echoFlagKey: "AREnableViewPortPrefetching", }, + AREnableHomeViewQuickLinks: { + description: "Enable Home View Quick Links", + readyForRelease: false, + showInDevMenu: true, + }, } satisfies { [key: string]: FeatureDescriptor } export interface DevToggleDescriptor {