Fix ESLint react-hooks/exhaustive-deps

This commit is contained in:
Marcus Blättermann 2022-11-21 12:32:32 +01:00
parent a642fcf729
commit d8ef29cbff
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D

View File

@ -17,7 +17,7 @@ export default function Accordion({ title, id, expanded = false, spaced = false,
[classes.hidden]: isExpanded,
})
// Make sure accordion is expanded if JS is disabled
useEffect(() => setIsExpanded(expanded), [])
useEffect(() => setIsExpanded(expanded), [expanded])
return (
<section className="accordion" id={id}>
<div className={rootClassNames}>