refactor text parser

This commit is contained in:
2023-11-01 10:05:08 +07:00
parent fd5ecc18a9
commit e218ebee89
9 changed files with 234 additions and 213 deletions

View File

@@ -77,10 +77,13 @@ export function NotificationWidget() {
sub(
filter,
async (event) => {
queryClient.setQueryData(['notification'], (old: NDKEvent[]) => [
event,
...old,
]);
queryClient.setQueryData(
['notification'],
(prev: { pageParams: number; pages: Array<NDKEvent[]> }) => ({
...prev,
pages: [[event], ...prev.pages],
})
);
const user = ndk.getUser({ hexpubkey: event.pubkey });
await user.fetchProfile();