chore: add demo mode

This commit is contained in:
Steven
2023-07-14 18:14:14 +08:00
parent af31875e6a
commit bd9daddaef
11 changed files with 196 additions and 7 deletions

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("slash@stevenlgtm.com");
setPassword("secret");
}
}, []);
const handleEmailInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => {