Skip to content

Commit

Permalink
Call transition for router.refresh too
Browse files Browse the repository at this point in the history
  • Loading branch information
switz committed Sep 6, 2023
1 parent 0beca18 commit c7dfc44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ const Row = ({
}

const onLinkClick = (e: MouseEvent<HTMLAnchorElement>) => {
e.preventDefault();
if (pathname === href) {
router.refresh();
startTransition(() => router.refresh());
console.log('refreshing from row', pathname, href);
} else {
e.preventDefault();
startTransition(() => router.push(href));
}
};
Expand Down

0 comments on commit c7dfc44

Please sign in to comment.