minor updates

This commit is contained in:
Ren Amamiya
2023-05-30 09:56:16 +07:00
parent c8f643198e
commit 763af0da14
9 changed files with 58 additions and 36 deletions

View File

@@ -37,7 +37,10 @@ export function Page() {
const channelPubkey = searchParams.channelpub;
const account: any = useActiveAccount((state: any) => state.account);
const addMessage = useChannelMessages((state: any) => state.add);
const [addMessage, clear] = useChannelMessages((state: any) => [
state.add,
state.clear,
]);
const { data: muted } = useSWR(
account ? ["muted", account.id] : null,
@@ -88,6 +91,7 @@ export function Page() {
return () => {
unsubscribe();
clear();
};
},
);