🚧 wip: share genre tags UI for reuse

This commit is contained in:
2026-04-06 21:09:27 +07:00
parent a277372f43
commit 09ae6dd8fb
5 changed files with 143 additions and 10 deletions

View File

@ -1,4 +1,42 @@
export const getAnimeBySlug = async (slug: string) => {
export interface GetAnimeBySlugResponse {
success: boolean;
status: number;
message: string;
data: {
id: string;
title: string;
titleAlternative: {
type: string;
title: string;
}[];
genres: {
slug: string;
name: string;
}[];
slug: string;
malId: number;
pictureMedium: string;
pictureLarge: string;
country: string;
score: string;
status: string;
startAiring: string;
endAiring: string;
synopsis: string;
ageRating: string;
mediaType: string;
source: string;
onDraft: boolean;
uploadedBy: string;
deletedAt: null | string;
createdAt: string;
updatedAt: string;
};
}
export const getAnimeBySlug = async (
slug: string,
): Promise<GetAnimeBySlugResponse> => {
return {
success: true,
status: 200,
@ -20,6 +58,20 @@ export const getAnimeBySlug = async (slug: string) => {
title: "Sakamoto Days",
},
],
genres: [
{
slug: "action",
name: "Action",
},
{
slug: "slice-of-life",
name: "Slice of Life",
},
{
slug: "comedy",
name: "Comedy",
},
],
slug: "sakamoto-days",
malId: 58939,
pictureMedium: "https://myanimelist.net/images/anime/1026/146459.webp",