Skip to content

Commit

Permalink
UPDATE: tweaks to toolbar button to prevent suspense flash: next/link
Browse files Browse the repository at this point in the history
  • Loading branch information
fileformat committed Jul 30, 2024
1 parent db297c1 commit 757d017
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/components/ToolbarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IconType } from "react-icons";

import { Icon, IconButton } from "@chakra-ui/react";

import { Link as NextLink } from "@chakra-ui/next-js";
import Link from "next/link";

interface IProps {
ariaLabel: string;
Expand All @@ -23,15 +23,16 @@ function ToolbarButton({
size,
}: IProps) {
return (
<NextLink href={href}>
<Link href={href}>
<IconButton
aria-label={ariaLabel}
as="div"
icon={<Icon boxSize={boxSize} as={icon} />}
isActive={isActive}
size={size}
title={ariaLabel}
/>
</NextLink>
</Link>
);
}

Expand Down

0 comments on commit 757d017

Please sign in to comment.