File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
components/@HooKit/Characters Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
- import { AnimeCharacterEntryFragment } from "@/generated/graphql" ;
2
- import gql from 'graphql-tag' ; ;
3
- import { formated } from "@/utils/helpers" ;
1
+ import gql from 'graphql-tag' ; ;
4
2
import { LoveIcon } from "../AnimeDetails/Stats" ;
3
+ import { formated } from "@/utils/helpers" ;
4
+ import { AnimeCharacterEntryFragment } from '@/lib/types/anilist' ;
5
5
6
6
export const ANIME_CHARACTER_ENTRY = gql `
7
7
fragment AnimeCharacterEntry on CharacterEdge {
Original file line number Diff line number Diff line change 1
- import { AnimeCharactersListFragment } from '@/generated/graphql' ;
2
1
import gql from 'graphql-tag' ;
3
2
import Entry , { ANIME_CHARACTER_ENTRY } from './Entry' ;
3
+ import { AnimeCharactersFragment , AnimeCharactersListFragment } from '@/lib/types/anilist' ;
4
4
5
5
6
6
export const ANIME_CHARACTERS_LIST = gql `
@@ -17,7 +17,7 @@ export default function Swipe({ data }: { data: AnimeCharactersListFragment }) {
17
17
return
18
18
}
19
19
return < div className = 'flex overflow-x-scroll gap-3' >
20
- { data . edges ?. map ( ( char , index ) => (
20
+ { data . edges ?. map ( ( char : any , index : number ) => (
21
21
< Entry key = { index } data = { { node : char ?. node , voiceActors : char ?. voiceActors } } />
22
22
) ) }
23
23
</ div >
Original file line number Diff line number Diff line change 1
1
import PersonsIcon from '~icons/gravity-ui/persons'
2
- import gql from 'graphql-tag' ;
3
- import { AnimeCharactersFragment } from '@/generated/graphql' ;
2
+ import gql from 'graphql-tag' ;
4
3
import Swipe , { ANIME_CHARACTERS_LIST } from './Swipe' ;
5
- import { getDictionary } from '@/app/[lang]/dictionaries ' ;
4
+ import { AnimeCharactersFragment } from '@/lib/types/anilist ' ;
6
5
7
6
export const ANIME_CHARACTERS = gql `
8
7
fragment AnimeCharacters on Media {
@@ -20,10 +19,9 @@ export default async function Characters({ data }: { data: AnimeCharactersFragme
20
19
if ( ! data ?. characters ?. edges ) {
21
20
return
22
21
}
23
- const disc = await getDictionary ( 'helpers' ) ;
24
22
return < div className = "bg-base-200 p-3 my-4 rounded-lg" >
25
23
< div className = 'flex items-center gap-2 mb-2' >
26
- < PersonsIcon /> < h2 > { disc ?. characters } { data . title ?. userPreferred ?? 'Anime' } </ h2 >
24
+ < PersonsIcon /> < h2 > { data . title ?. userPreferred ?? 'Anime' } Characters </ h2 >
27
25
</ div >
28
26
< Swipe data = { { edges : data . characters . edges } } />
29
27
</ div > ;
You can’t perform that action at this time.
0 commit comments