feat: prefix and anti multi-check

This commit is contained in:
KirinBaka
2025-04-22 15:34:22 +08:00
parent bebf2c9640
commit ffc89fd069
10 changed files with 46 additions and 28 deletions

View File

@@ -6,7 +6,7 @@ const UserInputWrap = ({ children, setUser }) => {
const [begin, setBegin] = React.useState(false);
React.useEffect(() => {
setInputUser(localStorage.getItem("user") || "");
setInputUser(localStorage.getItem("username") || "");
}, []);
return (
@@ -17,9 +17,10 @@ const UserInputWrap = ({ children, setUser }) => {
display: "grid",
placeItems: "center",
alignItems: "center",
minHeight: "100vh",
// minHeight: "100vh",
}}
>
<h2 style={{ textAlign: "center" }}>ITSC </h2>
<div>
<input
style={{
@@ -45,7 +46,7 @@ const UserInputWrap = ({ children, setUser }) => {
}
setUser(inputUser.trim());
setBegin(true);
localStorage.setItem("user", inputUser.trim());
localStorage.setItem("username", inputUser.trim());
}}
>
Login