Skip to content

Commit

Permalink
add all missing deps to useEffect deps arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer-Sch committed Dec 1, 2023
1 parent d6337d5 commit 7836ed7
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/nextjs/components/dash-wind/containers/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Layout() {
if (newNotificationStatus === 0) (NotificationManager as any).error(newNotificationMessage, "Error");
dispatch(removeNotificationMessage());
}
}, [newNotificationMessage]);
}, [dispatch, newNotificationMessage, newNotificationStatus]);

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function SidebarSubmenu({ submenu, name, icon, className }: SidebarSubmenuProps)
})[0]
)
setIsExpanded(true);
}, []);
}, [router.pathname, submenu]);

return (
<div className="flex-col">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Bills" }));
}, []);
}, [dispatch]);

return <Billing />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Page Title" }));
}, []);
}, [dispatch]);

return (
<div className="hero h-4/5 bg-base-200">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Calendar" }));
}, []);
}, [dispatch]);

return <Calendar />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Analytics" }));
}, []);
}, [dispatch]);

return <Charts />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Integrations" }));
}, []);
}, [dispatch]);

return <Integration />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Leads" }));
}, []);
}, [dispatch]);

return <Leads />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Settings" }));
}, []);
}, [dispatch]);

return <ProfileSettings />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Team Members" }));
}, []);
}, [dispatch]);

return <Team />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "Transactions" }));
}, []);
}, [dispatch]);

return <Transactions />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "" }));
}, []);
}, [dispatch]);

return (
<div className="hero h-4/5 bg-base-200">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function InternalPage() {

useEffect(() => {
dispatch(setPageTitle({ title: "" }));
}, []);
}, [dispatch]);

return (
<div className="hero h-4/5 bg-base-200">
Expand Down

0 comments on commit 7836ed7

Please sign in to comment.