Skip to content

Commit

Permalink
fix useEffect warning
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaelaCretu11 committed Jun 30, 2023
1 parent 447c67e commit b7d28b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/manage/Blocks/Accordion/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,14 @@ const View = (props) => {

React.useEffect(() => {
setTimeout(() => scrollToElement(), animationDuration);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

React.useEffect(() => {
return data.collapsed
? activePanels && setActivePanel(activePanels || [])
: setActivePanel([firstIdFromPanels, ...(activePanels || [])]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [data.collapsed]);

return (
Expand Down

0 comments on commit b7d28b4

Please sign in to comment.