Skip to content

Commit

Permalink
feat(DIA-609): remove news thumbnail (#10158)
Browse files Browse the repository at this point in the history
feat: remove news thumbnail
  • Loading branch information
araujobarret committed Apr 26, 2024
1 parent 3365154 commit f4b0987
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/app/Scenes/Articles/News/ArticlesCards.tsx
@@ -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

0 comments on commit f4b0987

Please sign in to comment.