This commit is contained in:
2026-08-20 15:10:25 +02:00
parent cce9756a1b
commit 8cf69d5b02
9 changed files with 85 additions and 66 deletions
+12 -7
View File
@@ -1,5 +1,6 @@
import Enclave from "@/app/app";
import { ChannelPageProps } from "@/components/page/PageView";
import { useEffect } from "react";
export default function TextChannel({
appRef,
@@ -10,13 +11,17 @@ export default function TextChannel({
if (!channel) return null;
useEffect(() => {
appRef.current?.server?.websocket?.send({
method: "GetMessages",
channel_id: channel.id,
chunk: 0,
});
appRef.current?.forceRender();
}, []);
return (
<div
onClick={() => {
appRef.current?.sendMessage("Hello, World", channel.id);
}}
>
{channel.name}
</div>
<div>{JSON.stringify(appRef.current?.server?.messages[channel.id])}</div>
);
}