Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JaiZed committed Feb 10, 2024
1 parent fbeeb45 commit 4ce0bc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/Episodes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const SeriesEpisodesView: FunctionComponent = () => {
return <Navigate to={RouterNames.NotFound}></Navigate>;
}

let [state, setState] = useState({
const [state, setState] = useState({

Check failure on line 105 in frontend/src/pages/Episodes/index.tsx

View workflow job for this annotation

GitHub Actions / Frontend

React Hook "useState" is called conditionally. React Hooks must be called in the exact same order in every component render. Did you accidentally call a React Hook after an early return?
expand: false,
buttonText: "Expand All",
initial: true,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/Episodes/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ const Table: FunctionComponent<Props> = ({
// make sure season 0 is collapsed
instance.current.toggleRowExpanded([`season:0`], false);
} else {
if (expand != undefined) {
if (expand !== undefined) {
instance.current.toggleAllRowsExpanded(expand);
}
}
}
}, [maxSeason, expand]);
}, [maxSeason, expand, initial]);

return (
<GroupTable
Expand Down

0 comments on commit 4ce0bc0

Please sign in to comment.