From 792b60c4804e69d1548a40069cba18c08402d38d Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 22 Jul 2023 11:54:23 +0800 Subject: [PATCH] chore: update autofill in demo --- web/src/pages/SignIn.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/pages/SignIn.tsx b/web/src/pages/SignIn.tsx index 754d013..66e74dd 100644 --- a/web/src/pages/SignIn.tsx +++ b/web/src/pages/SignIn.tsx @@ -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) => {