2024-01-20 16:16:14 +00:00
|
|
|
|
2024-07-10 22:11:18 +00:00
|
|
|
import FundingGoal from "@/app/components/funding-goal";
|
|
|
|
import VodCard from "@/app/components/vod-card";
|
|
|
|
import { getVodTitle } from "@/app/components/vod-page";
|
|
|
|
import { getVods } from '@/app/lib/vods';
|
|
|
|
import { IVod } from "@/app/lib/vods";
|
2024-07-15 16:07:04 +00:00
|
|
|
import { IVtuber } from '@futureporn/types';
|
2024-07-10 22:11:18 +00:00
|
|
|
import { getVtubers } from "./lib/vtubers";
|
2024-01-20 16:16:14 +00:00
|
|
|
import VTuberCard from "./components/vtuber-card";
|
|
|
|
import Link from 'next/link';
|
|
|
|
import { notFound } from "next/navigation";
|
2024-12-12 07:23:46 +00:00
|
|
|
import { ErrorCard } from "./components/error-card";
|
2024-01-20 16:16:14 +00:00
|
|
|
|
2024-11-05 19:48:21 +00:00
|
|
|
|
2024-12-12 07:23:46 +00:00
|
|
|
export default async function Page() {
|
2024-11-05 19:48:21 +00:00
|
|
|
|
2024-12-16 20:39:23 +00:00
|
|
|
const { vods, count } = await getVods(1, 9, true);
|
2024-07-04 21:20:29 +00:00
|
|
|
|
2024-01-20 16:16:14 +00:00
|
|
|
const vtubers = await getVtubers();
|
2024-07-04 21:20:29 +00:00
|
|
|
|
2024-01-20 16:16:14 +00:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className="main">
|
|
|
|
<section className="section">
|
|
|
|
<div className="container">
|
|
|
|
<h1 className="title">
|
|
|
|
The Galaxy's Best VTuber Hentai Site
|
|
|
|
</h1>
|
|
|
|
<h2 className="subtitle">For adults only (NSFW)</h2>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
2024-03-29 07:28:02 +00:00
|
|
|
<FundingGoal />
|
2024-01-20 16:16:14 +00:00
|
|
|
|
2024-12-12 07:23:46 +00:00
|
|
|
|
2024-11-05 19:48:21 +00:00
|
|
|
|
2024-03-29 07:28:02 +00:00
|
|
|
<div className="section">
|
2024-01-20 16:16:14 +00:00
|
|
|
|
|
|
|
<h2 className="is-2 title">Latest VODs</h2>
|
|
|
|
<div className="columns is-multiline is-mobile">
|
2024-11-05 19:48:21 +00:00
|
|
|
|
|
|
|
|
2024-12-16 20:39:23 +00:00
|
|
|
{!vods && <div className="section"><p>Error: Failed to fetch VODs from the database</p></div> }
|
2024-11-05 19:48:21 +00:00
|
|
|
|
|
|
|
{vods && vods.map((vod: IVod) => (
|
2024-01-20 16:16:14 +00:00
|
|
|
<VodCard
|
|
|
|
key={vod.id}
|
|
|
|
id={vod.id}
|
|
|
|
title={getVodTitle(vod)}
|
2024-11-05 19:48:21 +00:00
|
|
|
date={vod.date}
|
|
|
|
muxAsset={vod.mux_asset?.asset_id}
|
|
|
|
vtuber={vod?.vtuber}
|
2024-12-16 20:39:23 +00:00
|
|
|
thumbnail={vod?.thumbnail?.cdn_url}
|
2024-01-20 16:16:14 +00:00
|
|
|
/>
|
|
|
|
))}
|
2024-12-16 20:39:23 +00:00
|
|
|
|
2024-01-20 16:16:14 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<Link className='button' href={`/latest-vods/1`}>See all Latest Vods</Link>
|
2024-03-29 07:28:02 +00:00
|
|
|
</div>
|
|
|
|
<div className="section">
|
2024-01-20 16:16:14 +00:00
|
|
|
|
|
|
|
<h2 className="is-2 title">VTubers</h2>
|
2024-03-29 07:28:02 +00:00
|
|
|
<nav className="columns is-multiline">
|
2024-12-12 07:23:46 +00:00
|
|
|
{!vtubers
|
|
|
|
? <ErrorCard message="Failed to fetch vtubers. Please try again."></ErrorCard>
|
|
|
|
: vtubers.map((vtuber: IVtuber) =>
|
|
|
|
<VTuberCard key={vtuber.id} {...vtuber} />
|
|
|
|
)
|
|
|
|
}
|
2024-03-29 07:28:02 +00:00
|
|
|
</nav>
|
|
|
|
</div>
|
2024-01-20 16:16:14 +00:00
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|