diff --git a/src/app/components/Waku.tsx b/src/app/components/Waku.tsx index 3364ca0..e1d1082 100644 --- a/src/app/components/Waku.tsx +++ b/src/app/components/Waku.tsx @@ -3,12 +3,15 @@ import { Block } from "@/components/Block"; import { Subtitle } from "@/components/Subtitle"; import { Button } from "@/components/Button"; import { MessageContent } from "@/hooks"; +import { SUPPORTED_PUBSUB_TOPICS } from "@/constants"; type WakuProps = { onSend: (nick: string, text: string) => Promise; activeContentTopic: string; + activePubsubTopic: string; messages: MessageContent[]; onActiveContentTopicChange: (contentTopic: string) => void; + onActivePubsubTopicChange: (pubsubTopic: string) => void; } export const Waku: React.FunctionComponent = (props) => { @@ -19,10 +22,14 @@ export const Waku: React.FunctionComponent = (props) => { onMessageChange, resetText, } = useMessage(); - const { + const [ contentTopic, onContentTopicChange, - } = useContentTopic(props.activeContentTopic); + ] = useTopic(props.activeContentTopic); + const [ + pubsubTopic, + onPubsubTopicChange, + ] = useTopic(props.activePubsubTopic); const onSendClick = async () => { await props.onSend(nick, text); @@ -38,18 +45,40 @@ export const Waku: React.FunctionComponent = (props) => { - - Waku - + Chat + + + + + + + + + + = (props) => { = (props) => { /> - +