Main page
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Enclave from "@/app/app";
|
||||
import ChannelPage from "./channel/ChannelPage";
|
||||
import { Channel } from "@/lib/types";
|
||||
import MainPage from "./MainPage";
|
||||
|
||||
export type ChannelPageProps = {
|
||||
kind: "channel";
|
||||
@@ -14,10 +15,14 @@ export default function Page({
|
||||
}: {
|
||||
appRef: React.RefObject<Enclave | null>;
|
||||
}) {
|
||||
if (!appRef.current?.page?.kind) return null;
|
||||
if (!appRef.current?.page?.kind) return <MainPage appRef={appRef} />;
|
||||
|
||||
switch (appRef.current?.page?.kind) {
|
||||
case "channel":
|
||||
return <ChannelPage appRef={appRef} />;
|
||||
return (
|
||||
<ChannelPage
|
||||
appRef={appRef as React.RefObject<Enclave<ChannelPageProps> | null>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user