updated note connector

This commit is contained in:
Ren Amamiya 2023-04-06 09:49:46 +07:00
parent 5437ec5c92
commit 365ec3df88
2 changed files with 7 additions and 5 deletions

View File

@ -49,9 +49,12 @@ export default function NoteConnector() {
parent_comment_id: '', parent_comment_id: '',
created_at: event.created_at, created_at: event.created_at,
account_id: activeAccount.id, account_id: activeAccount.id,
}).catch(console.error); })
// notify user reload to get newer note .then(() =>
setHasNewerNote(true); // notify user reload to get newer note
setHasNewerNote(true)
)
.catch(console.error);
} }
); );
}, [pool, relays, setHasNewerNote]); }, [pool, relays, setHasNewerNote]);

View File

@ -8,7 +8,6 @@ import { Placeholder } from '@components/note/placeholder';
import { hasNewerNoteAtom } from '@stores/note'; import { hasNewerNoteAtom } from '@stores/note';
import { dateToUnix } from '@utils/getDate'; import { dateToUnix } from '@utils/getDate';
import { filteredData } from '@utils/transform';
import { ArrowUpIcon } from '@radix-ui/react-icons'; import { ArrowUpIcon } from '@radix-ui/react-icons';
import { useAtom } from 'jotai'; import { useAtom } from 'jotai';
@ -100,7 +99,7 @@ export default function Page() {
)} )}
<Virtuoso <Virtuoso
ref={virtuosoRef} ref={virtuosoRef}
data={filteredData(data)} data={data}
itemContent={itemContent} itemContent={itemContent}
computeItemKey={computeItemKey} computeItemKey={computeItemKey}
components={COMPONENTS} components={COMPONENTS}