diff --git a/src/app/Components/ArticleCard.tsx b/src/app/Components/ArticleCard.tsx index dd99db2a4b8..52b0ca03797 100644 --- a/src/app/Components/ArticleCard.tsx +++ b/src/app/Components/ArticleCard.tsx @@ -1,15 +1,14 @@ import { - Spacer, Flex, - useTheme, - Text, - Touchable, + Image, SkeletonBox, SkeletonText, - Image, + Spacer, + Text, + useTheme, } from "@artsy/palette-mobile" import { ArticleCard_article$data } from "__generated__/ArticleCard_article.graphql" -import { navigate } from "app/system/navigation/navigate" +import { RouterLink } from "app/system/navigation/RouterLink" import { compact } from "lodash" import { DateTime } from "luxon" import { GestureResponderEvent, useWindowDimensions, View, ViewProps } from "react-native" @@ -27,13 +26,6 @@ interface ArticleCardProps extends ViewProps { export const ArticleCard: React.FC = ({ article, onPress, isFluid }) => { const imageURL = article.thumbnailImage?.url - const onTap = (event: GestureResponderEvent) => { - onPress?.(event) - if (article.href) { - navigate(article.href) - } - } - const { space } = useTheme() const { width } = useWindowDimensions() @@ -44,7 +36,7 @@ export const ArticleCard: React.FC = ({ article, onPress, isFl return ( - + {!!imageURL && (isFluid ? ( @@ -81,7 +73,7 @@ export const ArticleCard: React.FC = ({ article, onPress, isFl )} - + ) } diff --git a/src/app/Navigation/routes.tsx b/src/app/Navigation/routes.tsx index cabf48700d0..bf3a7c22e5d 100644 --- a/src/app/Navigation/routes.tsx +++ b/src/app/Navigation/routes.tsx @@ -21,7 +21,7 @@ import { ActivityScreen } from "app/Scenes/Activity/ActivityScreen" import { activityHeaderQuery } from "app/Scenes/Activity/components/ActivityHeader" import { ArtQuiz } from "app/Scenes/ArtQuiz/ArtQuiz" import { ArtQuizResults } from "app/Scenes/ArtQuiz/ArtQuizResults/ArtQuizResults" -import { ArticleScreen } from "app/Scenes/Article/ArticleScreen" +import { ArticleScreen, articleScreenQuery } from "app/Scenes/Article/ArticleScreen" import { ArticlesSlideShowScreen } from "app/Scenes/ArticleSlideShow/ArticleSlideShow" import { ArticlesScreen, ArticlesScreenQuery } from "app/Scenes/Articles/Articles" import { NewsScreen, NewsScreenQuery } from "app/Scenes/Articles/News/News" @@ -308,6 +308,7 @@ export const artsyDotNetRoutes = defineRoutes([ headerShown: false, }, }, + queries: [articleScreenQuery], }, { path: "/article/:articleID/slideshow", diff --git a/src/app/Scenes/Article/ArticleScreen.tsx b/src/app/Scenes/Article/ArticleScreen.tsx index 66b8691b438..00c0e91a584 100644 --- a/src/app/Scenes/Article/ArticleScreen.tsx +++ b/src/app/Scenes/Article/ArticleScreen.tsx @@ -32,7 +32,7 @@ export const ArticleScreen: React.FC = (props) => { const Article: React.FC = (props) => { const data = useLazyLoadQuery(articleScreenQuery, { - slug: props.articleID, + articleID: props.articleID, }) if (!data.article) { @@ -82,8 +82,8 @@ const Article: React.FC = (props) => { } export const articleScreenQuery = graphql` - query ArticleScreenQuery($slug: String!) { - article(id: $slug) { + query ArticleScreenQuery($articleID: String!) { + article(id: $articleID) { ...ArticleShareButton_article ...ArticleWebViewScreen_article ...ArticleBody_article diff --git a/src/app/Scenes/HomeView/Components/ActivityIndicator.tsx b/src/app/Scenes/HomeView/Components/ActivityIndicator.tsx index 9969e7578bb..04f3f87492b 100644 --- a/src/app/Scenes/HomeView/Components/ActivityIndicator.tsx +++ b/src/app/Scenes/HomeView/Components/ActivityIndicator.tsx @@ -1,9 +1,8 @@ import { BellIcon, Box, DEFAULT_HIT_SLOP, VisualClueDot } from "@artsy/palette-mobile" import { useHomeViewTracking } from "app/Scenes/HomeView/hooks/useHomeViewTracking" -import { navigate } from "app/system/navigation/navigate" +import { RouterLink } from "app/system/navigation/RouterLink" import { useActivityDotExperiment } from "app/utils/experiments/useActivityDotExperiment" import React from "react" -import { TouchableOpacity } from "react-native" interface ActivityIndicatorProps { hasUnseenNotifications: boolean @@ -22,19 +21,18 @@ export const ActivityIndicator: React.FC = (props) => { const navigateToActivityPanel = () => { tracking.tappedNotificationBell() - - navigate("/notifications") } return ( - - + ) } diff --git a/src/app/Scenes/HomeView/Components/ActivityRailItem.tsx b/src/app/Scenes/HomeView/Components/ActivityRailItem.tsx index b33876def9d..bbb6100d737 100644 --- a/src/app/Scenes/HomeView/Components/ActivityRailItem.tsx +++ b/src/app/Scenes/HomeView/Components/ActivityRailItem.tsx @@ -49,7 +49,7 @@ export const ActivityRailItem: React.FC = (props) => { const { href, passProps } = getActivityItemHref(item) return ( - + - - { - trackEvent(tracks.tappedHeader()) - navigate("/new-for-you") - }} - /> - + { + trackEvent(tracks.tappedHeader()) + }} + px={2} + /> +