👔 feat: add base structure for anime page

This commit is contained in:
2026-04-05 22:48:47 +07:00
parent 5a8395e50b
commit a277372f43
6 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,9 @@
import AnimeIndex from "@/features/anime";
export default function page() {
return (
<div>
<AnimeIndex />
</div>
);
}

View File

@ -0,0 +1,44 @@
export const getAnimeBySlug = async (slug: string) => {
return {
success: true,
status: 200,
message: "Media fetched successfully",
data: {
id: "019cc6ea-5f59-70ec-8c64-2c716a32e0a9",
title: "Sakamoto Days",
titleAlternative: [
{
type: "Default",
title: "Sakamoto Days",
},
{
type: "Japanese",
title: "SAKAMOTO DAYS",
},
{
type: "English",
title: "Sakamoto Days",
},
],
slug: "sakamoto-days",
malId: 58939,
pictureMedium: "https://myanimelist.net/images/anime/1026/146459.webp",
pictureLarge: "https://myanimelist.net/images/anime/1026/146459l.webp",
country: "JP",
score: "7.59",
status: "Finished Airing",
startAiring: "2025-01-11T00:00:00.000Z",
endAiring: "2025-03-22T00:00:00.000Z",
synopsis:
"The name Tarou Sakamoto once instilled fear in every villain. No other professional hitman matched his prowess, and fellow assassins revered him. However, Sakamoto fell in love. In five short years, he married, became a father, put on some weight, and traded his weapons for an apron as he became the owner of a humble convenience store.\n\nAlthough Sakamoto is decidedly retired, he finds his old life of crime hard to shake off. His former partner, Shin Asakura, reappears and resolves to stay with Sakamoto's family under their strict no-kill rule. To make matters worse, a large bounty is placed on Sakamoto's head. Numerous assassins now pursue him—but they are in for a surprise. Sakamoto has not lost his edge, and no matter what tricks his enemies pull, he will fight off every last one to protect his dear family.\n\n[Written by MAL Rewrite]",
ageRating: "R - 17+ (violence & profanity)",
mediaType: "TV",
source: "Manga",
onDraft: false,
uploadedBy: "019c0645-a3b5-747a-83bb-0fca3040f951",
deletedAt: null,
createdAt: "2026-02-19T14:35:00.053Z",
updatedAt: "2026-03-07T06:09:34.575Z",
},
};
};

11
features/anime/index.tsx Normal file
View File

@ -0,0 +1,11 @@
import AnimeInformation from "./sections/Information/wrapper";
const AnimeIndex = () => {
return (
<div>
<AnimeInformation />
</div>
);
};
export default AnimeIndex;

View File

@ -0,0 +1,9 @@
import { getAnimeBySlug } from "../../actions/getAnimeBySlug";
const AnimeInformationMain = async () => {
const data = async () => await getAnimeBySlug("sakamoto-days");
const result = await data();
return <div>Data: {JSON.stringify(result)}</div>;
};
export default AnimeInformationMain;

View File

@ -0,0 +1,3 @@
export const AnimeInformationSkeleton = () => {
return <div>Loading...</div>;
};

View File

@ -0,0 +1,15 @@
import React, { Suspense } from "react";
import AnimeInformationMain from "./main";
import { AnimeInformationSkeleton } from "./skeleton";
const AnimeInformation = () => {
return (
<div>
<Suspense fallback={<AnimeInformationSkeleton />}>
<AnimeInformationMain />
</Suspense>
</div>
);
};
export default AnimeInformation;