Skip to content

Commit

Permalink
Merge pull request #2277 from edenmind/YunusAndreasson/issue2275
Browse files Browse the repository at this point in the history
feat(mobile): ✨ Add meta to card
  • Loading branch information
YunusAndreasson committed Nov 8, 2023
2 parents d283e93 + a8526c3 commit 0b2ad15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Binary file modified mobile/.yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"homepage": "https://openarabic.io",
"repository": "https://github.com/edenmind/OpenArabic",
"version": "1445.2.400",
"version": "1445.2.401",
"authors": [
"Yunus Andreasson <yunus@edenmind.com> (https://github.com/YunusAndreasson)"
],
Expand Down
8 changes: 4 additions & 4 deletions mobile/screens/text-list-card-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ export default function TextListCardText({ setShouldReload, navigation, text })
})
}

const numberOfWordsInText = text?.sentences?.reduce((acc, sentence) => acc + sentence?.words?.length, 0) ?? 0
const footer = `${text.views} views · ${text.timeAgo}`

const content = (
<>
<Card.Cover source={{ uri: text.image }} />
<Card.Title title={text.title} subtitle={text.category} titleStyle={{ ...sharedStyle.cardTitle }} />
<Card.Title title={text.title} subtitle={text.source} titleStyle={{ ...sharedStyle.cardTitle }} />
<Card.Content>
<Text variant="bodyMedium">{text.introduction}</Text>
</Card.Content>
<Card.Actions style={{ ...sharedStyle.cardAction }}>
<Text variant="bodySmall" style={{ color: theme.colors.outline, left: 10, position: 'absolute' }}>
{text.source}
{footer}
</Text>
<CategoryChip category={`${numberOfWordsInText} words`} />
<CategoryChip category={text.category} />
</Card.Actions>
</>
)
Expand Down

0 comments on commit 0b2ad15

Please sign in to comment.