Skip to content

Commit a198e3e

Browse files
author
juice
committed
add: navigate login page
1 parent 946ad50 commit a198e3e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/services/setting/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import LanguageSetting from "./LanguageSetting";
44
import PolicySection from "./Policy";
55
import FAQSection from "./Question";
66
import { useAuthStore } from "../../store/auth";
7+
import { useNavigate } from "react-router-dom";
78

89
function SettingPage() {
910
const { logout } = useAuthStore();
11+
const navigate = useNavigate();
1012
return (
1113
<main className="pb-52 pt-16 mt-5 bg-white">
1214
<div className="flex flex-col items-center gap-5 w-full px-5">
@@ -18,12 +20,12 @@ function SettingPage() {
1820
className=" text-main font-bold underline cursor-pointer"
1921
onClick={() => {
2022
logout();
23+
navigate("/login");
2124
}}
2225
>
2326
Logout
2427
</p>
2528
</div>
26-
2729
<BottomNavigation />
2830
</main>
2931
);

0 commit comments

Comments
 (0)