Skip to content

Commit

Permalink
use useIsomorphicLayoutEffect to make it SSR friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup committed Dec 1, 2022
1 parent a04f781 commit 2bd997d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/UnderlineNav2/UnderlineNavItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {forwardRef, useLayoutEffect, useRef, useContext, MutableRefObject, RefObject} from 'react'
import React, {forwardRef, useRef, useContext, MutableRefObject, RefObject} from 'react'
import Box from '../Box'
import {merge, SxProp} from '../sx'
import {IconProps} from '@primer/octicons-react'
Expand All @@ -7,6 +7,7 @@ import {UnderlineNavContext} from './UnderlineNavContext'
import CounterLabel from '../CounterLabel'
import {getLinkStyles, wrapperStyles, iconWrapStyles, counterStyles} from './styles'
import {LoadingCounter} from './LoadingCounter'
import useLayoutEffect from '../utils/useIsomorphicLayoutEffect'

// adopted from React.AnchorHTMLAttributes
type LinkProps = {
Expand Down

0 comments on commit 2bd997d

Please sign in to comment.