Skip to content

Commit

Permalink
update: sign-in form with environment prefilled defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysingh2219 committed Sep 30, 2024
1 parent 023fc14 commit b747d03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/twenty-front/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
REACT_APP_SERVER_BASE_URL=http://localhost:3000
GENERATE_SOURCEMAP=false
SIGN_IN_PREFILLED_DEFAULT_LOGIN=[email protected]
SIGN_IN_PREFILLED_DEFAULT_PASSWORD=Applecar2025

# ———————— Optional ————————
# CHROMATIC_PROJECT_TOKEN=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ export const useSignInUpForm = () => {

useEffect(() => {
if (isSignInPrefilled === true) {
form.setValue('email', '[email protected]');
form.setValue('password', 'Applecar2025');
form.setValue(
'email',
process.env.SIGN_IN_PREFILLED_DEFAULT_LOGIN || ' [email protected]',
);
form.setValue(
'password',
process.env.SIGN_IN_PREFILLED_DEFAULT_PASSWORD || 'Applecar2025',
);
}
}, [form, isSignInPrefilled]);
return { form: form };
Expand Down

0 comments on commit b747d03

Please sign in to comment.