Fix recursion
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import Enclave from "@/app/app";
|
||||
import { ChannelPageProps } from "@/components/page/PageView";
|
||||
import TextChannel from "./TextChannel";
|
||||
|
||||
export default function ChannelPage({
|
||||
appRef,
|
||||
}: {
|
||||
appRef: React.RefObject<Enclave<ChannelPageProps> | null>;
|
||||
}) {
|
||||
if (!appRef.current?.page?.channel.kind) return null;
|
||||
|
||||
switch (appRef.current?.page?.channel.kind) {
|
||||
case "text":
|
||||
return <ChannelPage appRef={appRef} />;
|
||||
|
||||
default:
|
||||
return null;
|
||||
return <TextChannel appRef={appRef} />;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user