epic-ux-design #1
@@ -233,7 +233,6 @@ export const NoteCard = memo(function NoteCard({
|
|||||||
startTransition(async () => {
|
startTransition(async () => {
|
||||||
addOptimisticNote({ isPinned: !note.isPinned })
|
addOptimisticNote({ isPinned: !note.isPinned })
|
||||||
await togglePin(note.id, !note.isPinned)
|
await togglePin(note.id, !note.isPinned)
|
||||||
router.refresh()
|
|
||||||
|
|
||||||
if (!note.isPinned) {
|
if (!note.isPinned) {
|
||||||
toast.success(t('notes.pinned') || 'Note pinned')
|
toast.success(t('notes.pinned') || 'Note pinned')
|
||||||
@@ -247,7 +246,6 @@ export const NoteCard = memo(function NoteCard({
|
|||||||
startTransition(async () => {
|
startTransition(async () => {
|
||||||
addOptimisticNote({ isArchived: !note.isArchived })
|
addOptimisticNote({ isArchived: !note.isArchived })
|
||||||
await toggleArchive(note.id, !note.isArchived)
|
await toggleArchive(note.id, !note.isArchived)
|
||||||
router.refresh()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user