chore: update autofill in demo

This commit is contained in:
Steven 2023-07-22 11:54:23 +08:00
parent 1418fc2209
commit 792b60c480

View File

@ -11,7 +11,10 @@ const SignIn: React.FC = () => {
const navigate = useNavigate();
const userStore = useUserStore();
const {
workspaceProfile: { disallowSignUp },
workspaceProfile: {
disallowSignUp,
profile: { mode },
},
} = useAppSelector((state) => state.global);
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
@ -24,6 +27,11 @@ const SignIn: React.FC = () => {
replace: true,
});
}
if (mode === "demo") {
setEmail("steven@usememos.com");
setPassword("secret");
}
}, []);
const handleEmailInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => {