Skip to content

Commit

Permalink
legacyBehavior fix for hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane98c committed Jan 6, 2025
1 parent 7caf12c commit 96af793
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
29 changes: 15 additions & 14 deletions src/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,21 @@ const Footer = () => {
pt: [2],
}}
>
<Link
as={NextLink}
href='/terms'
sx={{
textDecoration: 'none',
fontSize: [1, 1, 1, 2],
color: 'secondary',
fontFamily: 'mono',
letterSpacing: 'mono',
display: 'block',
}}
>
READ OUR TERMS
</Link>
<NextLink href='/terms' passHref legacyBehavior>
<Box
as='a'
sx={{
textDecoration: 'none',
fontSize: [1, 1, 1, 2],
color: 'secondary',
fontFamily: 'mono',
letterSpacing: 'mono',
display: 'block',
}}
>
READ OUR TERMS
</Box>
</NextLink>
</Box>
</Column>
<Column
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 96af793

Please sign in to comment.