Skip to content

Commit

Permalink
Merge pull request #175 from carbonplan/Shane98c/fix-hydration
Browse files Browse the repository at this point in the history
Fix hydration errors from next update
  • Loading branch information
Shane98c authored Jan 6, 2025
2 parents 42e91ef + 96af793 commit 4f420c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const Footer = () => {
pt: [2],
}}
>
<NextLink href='/terms' passHref>
<NextLink href='/terms' passHref legacyBehavior>
<Box
as='a'
sx={{
Expand Down
4 changes: 2 additions & 2 deletions src/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const Nav = ({ link, mode, nav, first, setExpanded }) => {

if (mode === 'homepage' || (mode === 'local' && nav === url)) {
return (
<NextLink href={href} passHref>
<NextLink href={href} passHref legacyBehavior>
<Link
onClick={() => {
if (nav === url) setExpanded(false)
Expand Down Expand Up @@ -126,7 +126,7 @@ const Header = ({ status, mode, nav, menuItems }) => {
sx={{ pointerEvents: 'all', display: 'block', width: 'fit-content' }}
>
{(mode == 'homepage' || mode == 'local') && (
<NextLink href='/' passHref>
<NextLink href='/' passHref legacyBehavior>
<Link
aria-label='CarbonPlan Homepage'
sx={{
Expand Down
2 changes: 1 addition & 1 deletion src/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Link = (
) => {
if (internal || (href && href.startsWith('/'))) {
return (
<NextLink href={href} passHref>
<NextLink href={href} passHref legacyBehavior>
<ThemedLink ref={ref} {...props}>
{children}
</ThemedLink>
Expand Down

0 comments on commit 4f420c7

Please sign in to comment.