Next.js Discord

Discord Forum

is the way to navigate and update isRead?

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
  const handleNavigation = (e: MouseEvent<HTMLDivElement, globalThis.MouseEvent>) => {
    e.stopPropagation()

    // if (isPending) return;

    router.push(`/${currentUsername}/status/${dataNotification.post?.id}`);
    addToNavigationHistory(getCurrentPath());

    // if (!dataNotification.isRead) {
    //   startTransition(() => {
    //     markAsReadNotification(dataNotification.id, path)
    //   })
    // }
  }

0 Replies