workspace with decoupled nostr package

This commit is contained in:
ennmichael
2023-02-11 21:05:46 +01:00
parent 52e0809622
commit 2a211b78a1
260 changed files with 2363 additions and 714 deletions

View File

@ -0,0 +1,31 @@
import { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { HexKey } from "@snort/nostr";
import { markNotificationsRead } from "State/Login";
import { RootState } from "State/Store";
import Timeline from "Element/Timeline";
export default function NotificationsPage() {
const dispatch = useDispatch();
const pubkey = useSelector<RootState, HexKey | undefined>(s => s.login.publicKey);
useEffect(() => {
dispatch(markNotificationsRead());
}, []);
return (
<>
{pubkey && (
<Timeline
subject={{
type: "ptag",
items: [pubkey],
discriminator: pubkey.slice(0, 12),
}}
postsOnly={false}
method={"TIME_RANGE"}
/>
)}
</>
);
}