Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: reseting zustand after sign out

Andrej9352b9f77b10
diff --git a/apps/web/public/manifest.json b/apps/web/public/manifest.json
index 013d4a6a5..fb0e463f5 100644
--- a/apps/web/public/manifest.json
+++ b/apps/web/public/manifest.json
@@ -1,41 +1,41 @@
{
- "name": "App",
- "icons": [
- {
- "src": "\/android-icon-36x36.png",
- "sizes": "36x36",
- "type": "image\/png",
- "density": "0.75"
- },
- {
- "src": "\/android-icon-48x48.png",
- "sizes": "48x48",
- "type": "image\/png",
- "density": "1.0"
- },
- {
- "src": "\/android-icon-72x72.png",
- "sizes": "72x72",
- "type": "image\/png",
- "density": "1.5"
- },
- {
- "src": "\/android-icon-96x96.png",
- "sizes": "96x96",
- "type": "image\/png",
- "density": "2.0"
- },
- {
- "src": "\/android-icon-144x144.png",
- "sizes": "144x144",
- "type": "image\/png",
- "density": "3.0"
- },
- {
- "src": "\/android-icon-192x192.png",
- "sizes": "192x192",
- "type": "image\/png",
- "density": "4.0"
- }
- ]
-}
\ No newline at end of file
+ "name": "App",
+ "icons": [
+ {
+ "src": "/android-icon-36x36.png",
+ "sizes": "36x36",
+ "type": "image/png",
+ "density": "0.75"
+ },
+ {
+ "src": "/android-icon-48x48.png",
+ "sizes": "48x48",
+ "type": "image/png",
+ "density": "1.0"
+ },
+ {
+ "src": "/android-icon-72x72.png",
+ "sizes": "72x72",
+ "type": "image/png",
+ "density": "1.5"
+ },
+ {
+ "src": "/android-icon-96x96.png",
+ "sizes": "96x96",
+ "type": "image/png",
+ "density": "2.0"
+ },
+ {
+ "src": "/android-icon-144x144.png",
+ "sizes": "144x144",
+ "type": "image/png",
+ "density": "3.0"
+ },
+ {
+ "src": "/android-icon-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "density": "4.0"
+ }
+ ]
+}
diff --git a/apps/web/src/components/common/sidebar/sections/bottom-actions/sign-out-button.tsx b/apps/web/src/components/common/sidebar/sections/bottom-actions/sign-out-button.tsx
index 02c4b59ed..003c25a7c 100644
--- a/apps/web/src/components/common/sidebar/sections/bottom-actions/sign-out-button.tsx
+++ b/apps/web/src/components/common/sidebar/sections/bottom-actions/sign-out-button.tsx
@@ -1,11 +1,15 @@
import useAuth from "@/components/providers/auth-provider/hooks/use-auth";
import useSignOut from "@/hooks/mutations/use-sign-out";
+import useProjectStore from "@/store/project";
+import useWorkspaceStore from "@/store/workspace";
import { useQueryClient } from "@tanstack/react-query";
import { useRouter } from "@tanstack/react-router";
import { LogOut } from "lucide-react";
function SignOutButton() {
const { setUser } = useAuth();
+ const { setProject } = useProjectStore();
+ const { setWorkspace } = useWorkspaceStore();
const { mutateAsync, isPending } = useSignOut();
const queryClient = useQueryClient();
const { history } = useRouter();
@@ -17,6 +21,8 @@ function SignOutButton() {
type: "all",
});
setUser(null);
+ setProject(undefined);
+ setWorkspace(undefined);
history.push("/auth/sign-in");
};