Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DIA-609): remove news thumbnail #10158

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 7 additions & 14 deletions src/app/Scenes/Articles/News/ArticlesCards.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ActionType, ContextModule, OwnerType, TappedNewsSection } from "@artsy/cohesion"
import { Flex, Image, Separator, Text, Touchable, useSpace } from "@artsy/palette-mobile"
import { Flex, Separator, Text, Touchable, useSpace } from "@artsy/palette-mobile"
import { ArticlesCards_viewer$key } from "__generated__/ArticlesCards_viewer.graphql"
import { Stack } from "app/Components/Stack"
import { navigate } from "app/system/navigation/navigate"
import { graphql, useFragment } from "react-relay"
import { useTracking } from "react-tracking"
Expand All @@ -25,17 +24,16 @@ export const ArticlesCards: React.FC<ArticleNewsProps> = ({ viewer }) => {
}

return (
<Stack spacing={2} m={2} p={2} border="1px solid" borderColor="black30" style={{ flex: 0 }}>
<Flex m={2} p={2} border="1px solid" borderColor="black30" gap={space(2)}>
<Flex flexDirection="row" justifyContent="space-between" alignItems="center">
<Text variant="lg-display">News</Text>
<Text variant="lg-display">{date}</Text>
</Flex>
{data.articles.map((article, index) => (
<Flex key={index} gap={space(1)}>
<Flex key={index} gap={space(2)}>
<Touchable onPress={() => handleOnPress(article.href ?? "")}>
<Flex flexDirection="row" alignItems="center" gap={space(1)}>
<Image src={article.thumbnailImage?.url ?? ""} aspectRatio={1.0} width={60} />
<Text variant="sm-display" numberOfLines={3} style={{ width: "75%" }}>
<Flex flexDirection="row" alignItems="center">
<Text variant="sm-display" numberOfLines={3}>
{article.title}
</Text>
</Flex>
Expand All @@ -44,14 +42,12 @@ export const ArticlesCards: React.FC<ArticleNewsProps> = ({ viewer }) => {
</Flex>
))}
<Touchable
onPress={() => {
navigate("/news")
}}
onPress={() => navigate("/news")}
style={{ flexDirection: "row", justifyContent: "flex-end" }}
>
<Text variant="sm-display">More in News</Text>
</Touchable>
</Stack>
</Flex>
)
}

Expand All @@ -61,9 +57,6 @@ const ArticlesNewsFragment = graphql`
internalID
title
href
thumbnailImage {
url
}
}
}
`
Expand Down