Add wordsCount and better center new grid cards
This commit is contained in:
@ -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>
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user