File tree Expand file tree Collapse file tree
main/src/app/[roomId]/contents/[contentId] Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { db } from "@/db/db" ;
2+ import { contentsTable } from "@/db/schema" ;
3+ import { and , eq } from "drizzle-orm" ;
4+
5+ export default async function ContentPage ( {
6+ params,
7+ } : {
8+ params : Promise < { roomId : string ; contentId : string } > ;
9+ } ) {
10+ const { contentId } = await params ;
11+ const content = (
12+ await db
13+ . select ( )
14+ . from ( contentsTable )
15+ . where ( and ( eq ( contentsTable . id , contentId ) , eq ( contentsTable . status , "available" ) ) )
16+ ) . at ( 0 ) ;
17+ if ( ! content ) {
18+ return < div > コンテンツが存在しません</ div > ;
19+ }
20+
21+ return (
22+ < div >
23+ { /* biome-ignore lint/a11y/useMediaCaption: <explanation> */ }
24+ < video />
25+ < div >
26+ < div >
27+ < span > { content . title } </ span >
28+ </ div >
29+ < span > { content . description } </ span >
30+ </ div >
31+ </ div >
32+ ) ;
33+ }
You can’t perform that action at this time.
0 commit comments