Add wordsCount and better center new grid cards

This commit is contained in:
Jackson Harper
2023-02-27 15:07:04 +08:00
parent c14550f14f
commit e9ae311559
2 changed files with 8 additions and 1 deletions

View File

@ -161,7 +161,12 @@ export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element {
fontFamily: 'SF Pro Display',
}}
>
15 min read
{props.item.wordsCount ?? 0 > 0
? `${Math.max(
1,
Math.round(props.item.wordsCount / 235)
)} min read`
: null}
</Box>
)}
</HStack>

View File

@ -83,6 +83,7 @@ export type LibraryItemNode = {
subscription?: string
readAt?: string
savedAt?: string
wordsCount?: number
recommendations?: Recommendation[]
}
@ -168,6 +169,7 @@ export function useGetLibraryItemsQuery({
subscription
readAt
savedAt
wordsCount
recommendations {
id
name