Files
enclave/src/components/page/PageView.tsx
T
2026-08-20 10:24:13 +02:00

24 lines
494 B
TypeScript

import Enclave from "@/app/app";
import ChannelPage from "./channel/ChannelPage";
import { Channel } from "@/app/protocol";
export type ChannelPageProps = {
kind: "channel";
channel: Channel;
};
export type Page = ChannelPageProps;
export default function Page({
appRef,
}: {
appRef: React.RefObject<Enclave | null>;
}) {
if (!appRef.current?.page?.kind) return null;
switch (appRef.current?.page?.kind) {
case "channel":
return <ChannelPage appRef={appRef} />;
}
}