wip: native notification

This commit is contained in:
Ren Amamiya
2023-05-30 15:33:27 +07:00
parent b856c2b8b5
commit 1e5bd7e21f
7 changed files with 59 additions and 18 deletions

View File

@@ -24,7 +24,7 @@ export function Page() {
]);
const addMessage = useChatMessages((state: any) => state.add);
useSWRSubscription(account ? ["chat", pubkey] : null, ([, key]) => {
useSWRSubscription(account && pubkey ? ["chat", pubkey] : null, ([, key]) => {
const unsubscribe = pool.subscribe(
[
{
@@ -59,6 +59,8 @@ export function Page() {
};
}, [pubkey]);
if (!account) return <div>Fuck SSR</div>;
return (
<div className="h-full w-full grid grid-cols-3">
<div className="col-span-2 flex flex-col justify-between border-r border-zinc-900">