Message sending

This commit is contained in:
2026-08-20 10:53:52 +02:00
parent fc1c550a2e
commit 8bdae4ceb8
3 changed files with 54 additions and 1 deletions
+13 -1
View File
@@ -6,5 +6,17 @@ export default function TextChannel({
}: {
appRef: React.RefObject<Enclave<ChannelPageProps> | null>;
}) {
return <div>{appRef.current?.page?.channel.name}</div>;
const channel = appRef.current?.page?.channel;
if (!channel) return null;
return (
<div
onClick={() => {
appRef.current?.sendMessage("Hello, World", channel.id);
}}
>
{channel.name}
</div>
);
}