danmu-sim/app/danmu/page.tsx
2024-04-07 04:25:19 +08:00

51 lines
1.7 KiB
TypeScript

import { getToken } from "@/lib/actions/token";
import Controls from "./controls";
import Danmu from "./danmu";
import { listLives } from "@/lib/actions/live";
import { listSongs } from "../songs/actions";
import DanmuProvider from "./provider";
import LiveCheck from "./live-check";
import SongCheck from "./song-check";
import CurrentInput from "./current-input";
export default async function Page() {
const token = await getToken();
const lives = await listLives();
const songs = await listSongs();
return (
<div className="flex flex-col md:flex-row">
<DanmuProvider>
<section className="basis-1/3 card">
<div className="h-[50vh] md:h-[80vh] overflow-auto card bg-base-100 card-bordered m-8">
<div className="card-body">
<div className="card-title"></div>
<LiveCheck lives={lives} />
</div>
</div>
</section>
<section className="basis-1/3 card">
<div className="h-[50vh] md:h-[80vh] overflow-auto card bg-base-100 card-bordered m-8">
<div className="card-body">
<div className="card-title"></div>
<SongCheck songs={songs} />
</div>
</div>
</section>
<section className="basis-1/3 card">
<div className="card-body">
<div className="mockup-browser border">
<div className="mockup-browser-toolbar">
<CurrentInput />
</div>
<div className="divide-y divide-gray-300">
<Controls />
<Danmu token={token} />
</div>
</div>
</div>
</section>
</DanmuProvider>
</div>
);
}