Skip to content

Commit

Permalink
chore: resolving ref current issue with react compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanl17 committed Dec 24, 2024
1 parent 976a688 commit 50a8026
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,18 @@ export function ReleasesOverview() {
})
}, [releaseFilterDate, releaseGroupMode, router])

const hasMounted = useRef(false)
const [hasMounted, setHasMounted] = useState(false)

useEffect(() => {
hasMounted.current = true
setHasMounted(true)
}, [])

const currentArchivedPicker = useMemo(() => {
const groupModeButtonBaseProps = {
disabled: loading || !hasReleases,
mode: 'bleed' as ButtonMode,
padding: 2,
...(hasMounted.current
...(hasMounted
? {
initial: {opacity: 0},
animate: {opacity: 1},
Expand Down Expand Up @@ -269,6 +269,7 @@ export function ReleasesOverview() {
}, [
loading,
hasReleases,
hasMounted,
handleReleaseGroupModeChange,
releaseGroupMode,
t,
Expand Down

0 comments on commit 50a8026

Please sign in to comment.