@@ -132,7 +131,9 @@ const MyToolbar = memo(function MyToolbar() {
>)
}
- {server.data?.meta.serverName ?? "皮肤站"}
+
+ {server.data?.meta.serverName ?? "皮肤站"}
+
{nowUser.name != "" && (
@@ -173,7 +174,7 @@ const MyToolbar = memo(function MyToolbar() {
})
const MyList = memo(function MyList(p: { list: ListItem[] }) {
- useTilg()
+
return (
<>
@@ -251,7 +252,7 @@ const MyDrawer = function MyDrawer() {
}
] as ListItem[], [])
- useTilg()
+
return (<>
{userinfo.data && (
diff --git a/frontend/src/views/profile/Profile.tsx b/frontend/src/views/profile/Profile.tsx
index 1be2283..242791f 100644
--- a/frontend/src/views/profile/Profile.tsx
+++ b/frontend/src/views/profile/Profile.tsx
@@ -17,7 +17,6 @@ import type { ReactSkinview3dOptions } from "react-skinview3d"
import { WalkingAnimation } from "skinview3d"
import type { SkinViewer } from "skinview3d"
import Skeleton from '@mui/material/Skeleton';
-import useTilg from 'tilg';
import useTitle from '@/hooks/useTitle';
const Profile = function Profile() {
@@ -45,7 +44,7 @@ const Profile = function Profile() {
}, [SkinInfo.data])
- useTilg()
+
return (
<>
diff --git a/frontend/src/views/profile/Security.tsx b/frontend/src/views/profile/Security.tsx
index 10622c9..40dcfe5 100644
--- a/frontend/src/views/profile/Security.tsx
+++ b/frontend/src/views/profile/Security.tsx
@@ -7,10 +7,11 @@ import { useEffect, useState } from "react";
import { produce } from 'immer'
import { changePasswd } from "@/apis/apis";
import { useAtom, useSetAtom } from "jotai";
-import { LayoutAlertErr, token } from "@/store/store";
+import { LayoutAlertErr, token, user } from "@/store/store";
import Loading from "@/components/Loading";
import { ApiErr } from "@/apis/error";
import { useNavigate } from "react-router-dom";
+import useTitle from "@/hooks/useTitle";
export default function Security() {
const [pass, setPass] = useState({
@@ -23,7 +24,9 @@ export default function Security() {
const [nowToken, setToken] = useAtom(token)
const [load, setLoad] = useState(false)
const setLayoutErr = useSetAtom(LayoutAlertErr)
+ const setUser = useSetAtom(user)
const navigate = useNavigate();
+ useTitle("安全设置")
useEffect(() => {
if (pass.pass1 != pass.pass2 && pass.pass2 != "") {
@@ -43,7 +46,7 @@ export default function Security() {
return
}
setLayoutErr(String(e))
- }).finally(() => setLoad(false)).then(() => [navigate("/login"), setToken("no")])
+ }).finally(() => setLoad(false)).then(() => [navigate("/login"), setToken(""), setUser({ name: "", uuid: "" })])
}
diff --git a/frontend/src/views/profile/Textures.tsx b/frontend/src/views/profile/Textures.tsx
index 7537f2f..87cc30b 100644
--- a/frontend/src/views/profile/Textures.tsx
+++ b/frontend/src/views/profile/Textures.tsx
@@ -81,7 +81,7 @@ const Textures = function Textures() {
finally(() => setLoading(false))
}
- useTilg()
+
return (<>