Skip to content

Commit

Permalink
removed character card for better loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivaBhattacharjee committed Apr 11, 2024
1 parent 155382d commit 26f3bb2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/app/details/[animeId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { notFound } from "next/navigation";

import AddToBookmark from "@/components/buttons/AddToBookmark";
import ServerError from "@/components/error/ServerError";
import CharactersLoading from "@/components/loading/CharactersLoading";
// import CharactersLoading from "@/components/loading/CharactersLoading";
import EpisodeLoading from "@/components/loading/EpisodeLoading";
import RecommendedLoading from "@/components/loading/RecommendedLoading";
import RelationLoading from "@/components/loading/RelationLoading";
import NextAiringEpisode from "@/components/NextAiringEpisode";
import CharacterCard from "@/components/shared/cards/characterCard";
// import CharacterCard from "@/components/shared/cards/characterCard";
import EpisodeLists from "@/components/shared/cards/EpisodeLists";
import RelationCard from "@/components/shared/cards/RelationCard";
import { RecommendedAnime } from "@/components/shared/RecommendedAnime";
Expand Down Expand Up @@ -139,11 +139,11 @@ export default async function page({ params }: { params: { animeId: number } })
<RelationCard id={params.animeId} bannerImage={details.coverImage} />
</Suspense>
</div>
<div className="mt-7 flex flex-col gap-5">
{/* <div className="mt-7 flex flex-col gap-5">
<Suspense fallback={<CharactersLoading />}>
<CharacterCard characters={details.characters} />
</Suspense>
</div>
</div> */}
<div className="mt-7 flex flex-col gap-5">
<Suspense fallback={<RecommendedLoading />}>
<RecommendedAnime episode={params.animeId} />
Expand Down
8 changes: 4 additions & 4 deletions src/app/watch/[streamid]/[animeid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import AddToBookmark from "@/components/buttons/AddToBookmark";
import Share from "@/components/buttons/Share";
import CommentSection from "@/components/CommentSection";
import ServerError from "@/components/error/ServerError";
import CharactersLoading from "@/components/loading/CharactersLoading";
// import CharactersLoading from "@/components/loading/CharactersLoading";
import EpisodeLoading from "@/components/loading/EpisodeLoading";
import RecommendedLoading from "@/components/loading/RecommendedLoading";
import RelationLoading from "@/components/loading/RelationLoading";
import NextAiringEpisode from "@/components/NextAiringEpisode";
import CharacterCard from "@/components/shared/cards/characterCard";
// import CharacterCard from "@/components/shared/cards/characterCard";
import EpisodeLists from "@/components/shared/cards/EpisodeLists";
import RelationCard from "@/components/shared/cards/RelationCard";
import { RecommendedAnime } from "@/components/shared/RecommendedAnime";
Expand Down Expand Up @@ -164,11 +164,11 @@ const Page = async ({
<RelationCard bannerImage={details.coverImage} id={params.animeid} />
</Suspense>
</div>
<div className="mt-6">
{/* <div className="mt-6">
<Suspense fallback={<CharactersLoading />}>
<CharacterCard characters={details.characters} />
</Suspense>
</div>
</div> */}
<div className="mt-12">
<Suspense fallback={<RecommendedLoading />}>
<RecommendedAnime episode={params.animeid} />
Expand Down
2 changes: 1 addition & 1 deletion src/lib/AnimeFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const getAnimeDetails = async (animeid: number) => {
if (cachedData) {
return cachedData;
}
const response = await fetch(`${AnifyApi}/info/${animeid}?fields=[coverImage,status , genres,title , characters , relations , averageRating , description , type , format , year , totalEpisodes]`, {
const response = await fetch(`${AnifyApi}/info/${animeid}?fields=[coverImage,status , genres,title , relations , averageRating , description , type , format , year , totalEpisodes]`, {
cache: "no-cache",
});
const data = await response.json();
Expand Down

0 comments on commit 26f3bb2

Please sign in to comment.