import type { Metadata } from "next"; import Link from "next/link"; import { redirect } from "next/navigation"; import { ActionForm, SubmitButton } from "@/components/forms"; import { PageHeader } from "@/components/status"; import { Card, CardContent } from "@/components/ui/card"; import { Field, FieldDescription, FieldGroup, FieldLabel } from "@/components/ui/field"; import { NativeSelect, NativeSelectOption } from "@/components/ui/native-select"; import { api, getMe, unwrap } from "@/lib/api"; import { createRoom } from "../actions"; import { RoomFields } from "../room-fields"; export const metadata: Metadata = { title: "New room" }; export default async function NewRoom() { const me = await getMe(); if (!me) redirect("/signin?next=/rooms/new"); const { links } = await api.account.get().then(unwrap); return (
Back to rooms {links.length === 0 ? (

Link an IMVU account {" "} first: it's shown as the room's owner.

) : ( l.adult)} /> Owner {links.map((l) => ( {l.username} ))} The IMVU account shown as owner. It can decorate the room.
Make room
)}
); }