diff --git a/pkg/views/src/main.tsx b/pkg/views/src/main.tsx
index 0ded012..4d8c499 100644
--- a/pkg/views/src/main.tsx
+++ b/pkg/views/src/main.tsx
@@ -64,6 +64,7 @@ const router = createBrowserRouter([
children: [
{ path: "/auth/sign-up", errorElement: , lazy: () => import("@/pages/auth/sign-up.tsx") },
{ path: "/auth/sign-in", errorElement: , lazy: () => import("@/pages/auth/sign-in.tsx") },
+ { path: "/auth/sign-out", errorElement: , lazy: () => import("@/pages/auth/sign-out.tsx") },
{ path: "/auth/o/connect", errorElement: , lazy: () => import("@/pages/auth/connect.tsx") }
]
}
diff --git a/pkg/views/src/pages/auth/sign-out.tsx b/pkg/views/src/pages/auth/sign-out.tsx
new file mode 100644
index 0000000..6c37a8d
--- /dev/null
+++ b/pkg/views/src/pages/auth/sign-out.tsx
@@ -0,0 +1,50 @@
+import { Avatar, Button, Card, CardContent, Typography } from "@mui/material";
+import { useUserinfo } from "@/stores/userinfo.tsx";
+import LogoutIcon from "@mui/icons-material/Logout";
+import { useNavigate } from "react-router-dom";
+
+export function Component() {
+ const { clearUserinfo } = useUserinfo();
+
+ const navigate = useNavigate();
+
+ async function signout() {
+ clearUserinfo();
+ navigate("/");
+ }
+
+ return (
+ <>
+
+
+
+
+
+
+ Sign out
+
+ Sign out will clear your data on this device. Also will affected those use union identification services.
+ You need sign in again get access them.
+
+
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/pkg/views/src/stores/userinfo.tsx b/pkg/views/src/stores/userinfo.tsx
index 4f70622..4b7aa5c 100644
--- a/pkg/views/src/stores/userinfo.tsx
+++ b/pkg/views/src/stores/userinfo.tsx
@@ -42,8 +42,7 @@ export function UserinfoProvider(props: any) {
});
if (res.status !== 200) {
- clearUserinfo();
- window.location.reload();
+ return;
}
const data = await res.json();