forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: sign-in form with environment prefilled defaults
- Loading branch information
1 parent
023fc14
commit b747d03
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }; | ||
|