Files
enclave/src/components/page/channel/TextChannel.tsx
T
2026-08-20 10:53:52 +02:00

23 lines
458 B
TypeScript

import Enclave from "@/app/app";
import { ChannelPageProps } from "@/components/page/PageView";
export default function TextChannel({
appRef,
}: {
appRef: React.RefObject<Enclave<ChannelPageProps> | null>;
}) {
const channel = appRef.current?.page?.channel;
if (!channel) return null;
return (
<div
onClick={() => {
appRef.current?.sendMessage("Hello, World", channel.id);
}}
>
{channel.name}
</div>
);
}