migrate genre type
This commit is contained in:
@@ -49,7 +49,7 @@ export default function Anime() {
|
||||
|
||||
const { id } = useParams<{ id: string }>();
|
||||
|
||||
const [manga, setManga] = useState<IManga>();
|
||||
const [manga, setManga] = useState<IAnime>();
|
||||
const [episodes, setEpisodes] = useState<IEpisode[]>([]);
|
||||
const [fetchedEpisodes, setFetchedEpisodes] = useState(false);
|
||||
const [noEpisodesFound, setNoEpisodesFound] = useState(false);
|
||||
@@ -63,7 +63,7 @@ export default function Anime() {
|
||||
if (manga === undefined || !manga.freshData) {
|
||||
client.get(`/api/v1/anime/anime/${id}/?onlineFetch=${manga !== undefined}`)
|
||||
.then((response) => response.data)
|
||||
.then((data: IManga) => {
|
||||
.then((data: IAnime) => {
|
||||
setManga(data);
|
||||
setTitle(data.title);
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ export default function AnimeSearchSingle() {
|
||||
if (searchTerm.length > 0) {
|
||||
client.get(`/api/v1/anime/source/${sourceId}/search/${searchTerm}/${lastPageNum}`)
|
||||
.then((response) => response.data)
|
||||
.then((data: { mangaList: IManga[], hasNextPage: boolean }) => {
|
||||
.then((data: { mangaList: IAnime[], hasNextPage: boolean }) => {
|
||||
setMessage('');
|
||||
if (data.mangaList.length > 0) {
|
||||
setMangas([
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function Player() {
|
||||
setTitle('Reader');
|
||||
client.get(`/api/v1/anime/anime/${animeId}/`)
|
||||
.then((response) => response.data)
|
||||
.then((data: IManga) => {
|
||||
.then((data: IAnime) => {
|
||||
setTitle(data.title);
|
||||
});
|
||||
}, [episodeIndex]);
|
||||
|
||||
@@ -30,7 +30,7 @@ export default function SourceAnimes(props: { popular: boolean }) {
|
||||
const sourceType = props.popular ? 'popular' : 'latest';
|
||||
client.get(`/api/v1/anime/source/${sourceId}/${sourceType}/${lastPageNum}`)
|
||||
.then((response) => response.data)
|
||||
.then((data: { mangaList: IManga[], hasNextPage: boolean }) => {
|
||||
.then((data: { mangaList: IAnime[], hasNextPage: boolean }) => {
|
||||
setMangas([
|
||||
...mangas,
|
||||
...data.mangaList.map((it) => ({
|
||||
|
||||
Reference in New Issue
Block a user