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
+2 -3
View File
@@ -14,11 +14,10 @@ export default function Page({
}: { }: {
appRef: React.RefObject<Enclave | null>; appRef: React.RefObject<Enclave | null>;
}) { }) {
if (!appRef.current?.page?.kind) return null;
switch (appRef.current?.page?.kind) { switch (appRef.current?.page?.kind) {
case "channel": case "channel":
return <ChannelPage appRef={appRef} />; return <ChannelPage appRef={appRef} />;
default:
return null;
} }
} }
+4 -4
View File
@@ -1,16 +1,16 @@
import Enclave from "@/app/app"; import Enclave from "@/app/app";
import { ChannelPageProps } from "@/components/page/PageView"; import { ChannelPageProps } from "@/components/page/PageView";
import TextChannel from "./TextChannel";
export default function ChannelPage({ export default function ChannelPage({
appRef, appRef,
}: { }: {
appRef: React.RefObject<Enclave<ChannelPageProps> | null>; appRef: React.RefObject<Enclave<ChannelPageProps> | null>;
}) { }) {
if (!appRef.current?.page?.channel.kind) return null;
switch (appRef.current?.page?.channel.kind) { switch (appRef.current?.page?.channel.kind) {
case "text": case "text":
return <ChannelPage appRef={appRef} />; return <TextChannel appRef={appRef} />;
default:
return null;
} }
} }