Fix recursion

This commit is contained in:
2026-08-20 10:24:13 +02:00
parent 32271289f3
commit fc1c550a2e
2 changed files with 6 additions and 7 deletions
+4 -4
View File
@@ -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} />;
}
}