mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-28 00:49:40 +05:00
feat: add viewing of all collections of users, releases and favorite collections
This commit is contained in:
parent
c1204473ec
commit
3de552f271
6 changed files with 248 additions and 7 deletions
40
app/release/[id]/collections/page.tsx
Normal file
40
app/release/[id]/collections/page.tsx
Normal file
|
@ -0,0 +1,40 @@
|
|||
import { CollectionsFullPage } from "#/pages/CollectionsFull";
|
||||
import { fetchDataViaGet } from "#/api/utils";
|
||||
import type { Metadata, ResolvingMetadata } from "next";
|
||||
|
||||
export async function generateMetadata(
|
||||
{ params },
|
||||
parent: ResolvingMetadata
|
||||
): Promise<Metadata> {
|
||||
const id = params.id;
|
||||
const release = await fetchDataViaGet(`https://api.anixart.tv/release/${id}`);
|
||||
const previousOG = (await parent).openGraph;
|
||||
|
||||
return {
|
||||
title: release.release.title_ru + " - в коллекциях",
|
||||
description: release.release.description,
|
||||
openGraph: {
|
||||
...previousOG,
|
||||
images: [
|
||||
{
|
||||
url: release.release.image, // Must be an absolute URL
|
||||
width: 600,
|
||||
height: 800,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default async function Collections({ params }) {
|
||||
const release: any = await fetchDataViaGet(
|
||||
`https://api.anixart.tv/release/${params.id}`
|
||||
);
|
||||
return (
|
||||
<CollectionsFullPage
|
||||
type="release"
|
||||
title={release.release.title_ru + " в коллекциях"}
|
||||
release_id={params.id}
|
||||
/>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue