[FA-11] Fix react build issues
All checks were successful
CI / build-backend (pull_request) Successful in 1m7s
CI / build-frontend (pull_request) Successful in 26s

This commit is contained in:
gamer147
2025-11-26 08:48:00 -05:00
parent 0180a58084
commit 15a8185621
6 changed files with 756 additions and 1437 deletions

View File

@@ -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.'