[FA-11] Fix react build issues
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import type { Novel } from '../__generated__/graphql'
|
||||
import type { NovelsQuery } from '../__generated__/graphql'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from './ui/card'
|
||||
|
||||
type NovelNode = NonNullable<NonNullable<NovelsQuery['novels']>['edges']>[number]['node']
|
||||
|
||||
type NovelCardProps = {
|
||||
novel: Novel
|
||||
novel: NovelNode
|
||||
}
|
||||
|
||||
function pickText(novelText?: Novel['name'] | Novel['description']) {
|
||||
function pickText(novelText?: NovelNode['name'] | NovelNode['description']) {
|
||||
const texts = novelText?.texts ?? []
|
||||
const english = texts.find((t) => t.language === 'EN')
|
||||
return (english ?? texts[0])?.text ?? 'No description available.'
|
||||
|
||||
Reference in New Issue
Block a user