Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
feat: complete rebase with missing constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ReidyT committed Apr 16, 2024
1 parent 995e311 commit a986b9c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/cache": "11.11.0",
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.5",
"@graasp/query-client": "3.0.2",
"@graasp/query-client": "3.4.1",
"@graasp/sdk": "4.7.2",
"@graasp/translations": "1.26.0",
"@graasp/ui": "4.14.2",
Expand Down
11 changes: 10 additions & 1 deletion src/components/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { AUTH } from '../langs/constants';
import { emailValidator, nameValidator } from '../utils/validation';
import { AgreementForm } from './AgreementForm';
import EmailInput from './EmailInput';
import { EnableAnalyticsForm } from './EnableAnalyticsForm';
import FullscreenContainer from './FullscreenContainer';
import StyledTextField from './StyledTextField';
import SuccessContent from './SuccessContent';
Expand Down Expand Up @@ -56,6 +57,8 @@ const SignUp = () => {
const [successView, setSuccessView] = useState(false);
// enable validation after first click
const [shouldValidate, setShouldValidate] = useState(false);
const [enableSaveActions, setEnableSaveActions] = useState<boolean>(true);

const agreementFormHook = useAgreementForm();
const { verifyUserAgreements, userHasAcceptedAllTerms } = agreementFormHook;

Expand Down Expand Up @@ -128,13 +131,15 @@ const SignUp = () => {
captcha: token,
challenge,
lang: i18n.language,
enableSaveActions,
})
: signUp({
name: name.trim(),
email: lowercaseEmail,
captcha: token,
url: redirect.url,
lang: i18n.language,
enableSaveActions,
}));
setSuccessView(true);
}
Expand Down Expand Up @@ -190,6 +195,10 @@ const SignUp = () => {
disabled={Boolean(invitation?.email)}
shouldValidate={shouldValidate}
/>
<EnableAnalyticsForm
enableSaveActions={enableSaveActions}
onUpdateSaveActions={(enabled) => setEnableSaveActions(enabled)}
/>
<AgreementForm useAgreementForm={agreementFormHook} />
<ErrorDisplay error={registerError} />
<LoadingButton
Expand Down Expand Up @@ -217,4 +226,4 @@ const SignUpScreenWrapper = () => (
</FullscreenContainer>
);

export default SignUpScreenWrapper;
export default SignUpScreenWrapper;
1 change: 1 addition & 0 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const MAX_CHECKBOX_LABEL_WITH_PX_SIGN_UP = 330;
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3197,9 +3197,9 @@ __metadata:
languageName: node
linkType: hard

"@graasp/query-client@npm:3.0.2":
version: 3.0.2
resolution: "@graasp/query-client@npm:3.0.2"
"@graasp/query-client@npm:3.4.1":
version: 3.4.1
resolution: "@graasp/query-client@npm:3.4.1"
dependencies:
"@tanstack/react-query": "npm:4.36.1"
"@tanstack/react-query-devtools": "npm:4.36.1"
Expand All @@ -3210,7 +3210,7 @@ __metadata:
"@graasp/sdk": ^4.0.0
"@graasp/translations": ^1.23.0
react: ^18.0.0
checksum: 10/408d6eb4e5e8f024e8691ed65bb6fbd595da04d76ca0f897d538871c3ca1ddb43c31d83f1e707a95c14558e28377f326a3f0262d38558a808c2b410133386996
checksum: 10/c5858ed3071ffd5688510b71e298ab787a47586f0f178a3d150aa2db94e71dd99510fb4c91d345f3b818e6dce3de23b57fa5aa9e3b17c2853382a572f617e5c4
languageName: node
linkType: hard

Expand Down Expand Up @@ -9099,7 +9099,7 @@ __metadata:
"@emotion/cache": "npm:11.11.0"
"@emotion/react": "npm:11.11.4"
"@emotion/styled": "npm:11.11.5"
"@graasp/query-client": "npm:3.0.2"
"@graasp/query-client": "npm:3.4.1"
"@graasp/sdk": "npm:4.7.2"
"@graasp/translations": "npm:1.26.0"
"@graasp/ui": "npm:4.14.2"
Expand Down

0 comments on commit a986b9c

Please sign in to comment.