From c48bd45ab9e1a99c0b4c469ef8a0d8db7c90b20f Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Wed, 22 Jun 2022 11:32:15 +0100 Subject: [PATCH] fix: return a cleanup fn too --- client/src/app/routes/DashboardRoutes.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/app/routes/DashboardRoutes.tsx b/client/src/app/routes/DashboardRoutes.tsx index 6ba9be8c0..f17f22805 100644 --- a/client/src/app/routes/DashboardRoutes.tsx +++ b/client/src/app/routes/DashboardRoutes.tsx @@ -43,6 +43,10 @@ export default function DashboardRoutes() { } else { setBackground(null); } + + return () => { + setBackground(null); + }; }, [user]); if (hasVerifiedEmail === false) {