Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2022 Savoir-faire Linux Inc. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU Affero General Public License as |
| 6 | * published by the Free Software Foundation; either version 3 of the |
| 7 | * License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU Affero General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Affero General Public |
| 15 | * License along with this program. If not, see |
| 16 | * <https://www.gnu.org/licenses/>. |
| 17 | */ |
Gabriel Rochon | 7057b4f | 2022-11-21 13:28:01 -0500 | [diff] [blame] | 18 | import { |
| 19 | Box, |
| 20 | Button, |
| 21 | FormControl, |
| 22 | FormControlLabel, |
| 23 | Radio, |
| 24 | RadioGroup, |
| 25 | Stack, |
| 26 | Typography, |
| 27 | useMediaQuery, |
| 28 | } from '@mui/material'; |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 29 | import { Theme, useTheme } from '@mui/material/styles'; |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 30 | import { HttpStatusCode } from 'jami-web-common'; |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 31 | import { ChangeEvent, FormEvent, useContext, useEffect, useState } from 'react'; |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 32 | import { useTranslation } from 'react-i18next'; |
Ziwei Wang | 3ce1ac0 | 2023-02-03 11:59:03 -0500 | [diff] [blame] | 33 | import { Form, Link, useNavigate } from 'react-router-dom'; |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 34 | |
simon | ab4eec8 | 2022-11-08 20:32:43 -0500 | [diff] [blame] | 35 | import { NameStatus, PasswordInput, PasswordStatus, UsernameInput } from '../components/Input'; |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 36 | import ProcessingRequest from '../components/ProcessingRequest'; |
Ziwei Wang | 3ce1ac0 | 2023-02-03 11:59:03 -0500 | [diff] [blame] | 37 | import withAuthUI from '../components/WithAuthUI'; |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 38 | import { AlertSnackbarContext } from '../contexts/AlertSnackbarProvider'; |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 39 | import { |
| 40 | checkIfUserameIsRegistered, |
| 41 | checkPasswordStrength, |
| 42 | loginUser, |
| 43 | registerUser, |
| 44 | setAccessToken, |
| 45 | } from '../utils/auth'; |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 46 | import { inputWidth, jamiUsernamePattern } from '../utils/constants'; |
Ziwei Wang | 3ce1ac0 | 2023-02-03 11:59:03 -0500 | [diff] [blame] | 47 | function RegistrationForm() { |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 48 | const theme: Theme = useTheme(); |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 49 | const navigate = useNavigate(); |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 50 | const { t } = useTranslation(); |
| 51 | |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 52 | const [loading, setLoading] = useState(false); |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 53 | |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 54 | const [username, setUsername] = useState<string>(''); |
| 55 | const [password, setPassword] = useState<string>(''); |
| 56 | const [isJams, setIsJams] = useState<boolean>(false); |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 57 | |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 58 | const [usernameStatus, setUsernameStatus] = useState<NameStatus>('default'); |
| 59 | const [passwordStatus, setPasswordStatus] = useState<PasswordStatus>('default'); |
| 60 | |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 61 | const { setAlertContent } = useContext(AlertSnackbarContext); |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 62 | |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 63 | const isMobile: boolean = useMediaQuery(theme.breakpoints.only('xs')); |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 64 | |
| 65 | useEffect(() => { |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 66 | let timetoutId: ReturnType<typeof setTimeout>; |
| 67 | if (usernameStatus === 'valid') { |
| 68 | timetoutId = setTimeout(() => { |
| 69 | // useCheckIfUsernameIsRegisteredMutation.mutate(username); |
| 70 | checkIfUserameIsRegistered(username) |
| 71 | .then((response) => { |
Ziwei Wang | 3c94119 | 2023-02-15 12:26:43 -0500 | [diff] [blame] | 72 | const { status, data } = response; |
| 73 | if (status === HttpStatusCode.Ok) { |
| 74 | if (data === 'taken') { |
| 75 | setUsernameStatus('taken'); |
| 76 | } else { |
| 77 | setUsernameStatus('success'); |
| 78 | } |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 79 | } |
| 80 | }) |
| 81 | .catch((e) => { |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 82 | const { status } = e.response; |
| 83 | if (status === HttpStatusCode.BadRequest) { |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 84 | setUsernameStatus('invalid'); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 85 | } else { |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 86 | setAlertContent({ messageI18nKey: 'unknown_error_alert', severity: 'error', alertOpen: true }); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 87 | } |
| 88 | }); |
| 89 | }, 1000); |
| 90 | } |
| 91 | |
| 92 | return () => { |
| 93 | clearTimeout(timetoutId); |
| 94 | }; |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 95 | }, [t, username, usernameStatus, setAlertContent]); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 96 | |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 97 | const login = () => { |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 98 | setLoading(true); |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 99 | |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 100 | loginUser(username, password, isJams) |
| 101 | .then((response) => { |
| 102 | if (response.status === HttpStatusCode.Ok) { |
| 103 | setAccessToken(response.data.accessToken); |
| 104 | navigate('/conversation', { replace: true }); |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 105 | } |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 106 | }) |
| 107 | .catch((e) => { |
| 108 | console.log(e); |
| 109 | const { status } = e.response; |
| 110 | if (status === HttpStatusCode.BadRequest) { |
| 111 | //TODO: the only bad request response defined in the server is missing credentials. add the response message to the locale. |
| 112 | console.log(e.response.data); |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 113 | // setAlertContent(t('unknown_error_alert')); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 114 | } else if (status === HttpStatusCode.NotFound) { |
| 115 | //TODO: there are two different not found responses that could be returned by the server, use message to differentiate them? |
| 116 | console.log(e.response.data); |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 117 | // setAlertContent(t('login_username_not_found')); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 118 | } else if (status === HttpStatusCode.Unauthorized) { |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 119 | setAlertContent({ messageI18nKey: 'login_invalid_password', severity: 'error', alertOpen: true }); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 120 | } else { |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 121 | setAlertContent({ messageI18nKey: 'unknown_error_alert', severity: 'error', alertOpen: true }); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 122 | } |
| 123 | }) |
| 124 | .finally(() => { |
| 125 | setLoading(false); |
| 126 | }); |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 127 | }; |
| 128 | |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 129 | const createAccount = () => { |
| 130 | setLoading(true); |
| 131 | registerUser(username, password, isJams) |
| 132 | .then((response) => { |
| 133 | if (response.status === HttpStatusCode.Created) { |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 134 | setAlertContent({ messageI18nKey: 'registration_success', severity: 'success', alertOpen: true }); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 135 | login(); |
| 136 | } |
| 137 | }) |
| 138 | .catch((e) => { |
| 139 | console.log(e); |
| 140 | const { status } = e.response; |
| 141 | if (status === HttpStatusCode.BadRequest) { |
| 142 | //TODO: more than one bad request response defined in the server is missing credentials. add the response message to the locale. |
| 143 | console.log(e.response.data); |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 144 | // setAlertContent(t('unknown_error_alert')); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 145 | } else if (status === HttpStatusCode.Conflict) { |
| 146 | //TODO: there are two different conflict responses that could be returned by the server, use message to differentiate them? |
| 147 | console.log(e.response.data); |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 148 | // setAlertContent(t('login_username_not_found')); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 149 | } else if (status === HttpStatusCode.Unauthorized) { |
| 150 | //TODO: this is a response for JAMS, add message to the locale |
| 151 | } else { |
Ziwei Wang | 49765ec | 2023-02-13 16:35:32 -0500 | [diff] [blame] | 152 | setAlertContent({ messageI18nKey: 'unknown_error_alert', severity: 'error', alertOpen: true }); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 153 | } |
| 154 | }) |
| 155 | .finally(() => { |
| 156 | setLoading(false); |
| 157 | }); |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 158 | }; |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 159 | |
| 160 | const handleUsername = async (event: ChangeEvent<HTMLInputElement>) => { |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 161 | const usernameValue: string = event.target.value; |
| 162 | setUsername(usernameValue); |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 163 | |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 164 | if (usernameValue === '') { |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 165 | setUsernameStatus('default'); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 166 | return; |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 167 | } |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 168 | |
| 169 | if (!jamiUsernamePattern.test(usernameValue)) { |
| 170 | setUsernameStatus('invalid'); |
| 171 | return; |
| 172 | } |
| 173 | //The valid state is when the username passes the Regex test and is ready for availability check. |
| 174 | setUsernameStatus('valid'); |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 175 | }; |
| 176 | |
| 177 | const handlePassword = (event: ChangeEvent<HTMLInputElement>) => { |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 178 | const passwordValue: string = event.target.value; |
| 179 | setPassword(passwordValue); |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 180 | |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 181 | if (passwordValue.length > 0) { |
| 182 | const checkResult = checkPasswordStrength(passwordValue); |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 183 | setPasswordStatus(checkResult.valueCode); |
| 184 | } else { |
| 185 | setPasswordStatus('default'); |
| 186 | } |
| 187 | }; |
| 188 | |
Gabriel Rochon | 7057b4f | 2022-11-21 13:28:01 -0500 | [diff] [blame] | 189 | const handleIsJams = (event: ChangeEvent<HTMLInputElement>) => { |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 190 | setIsJams(event.target.value === 'jams'); |
Gabriel Rochon | 7057b4f | 2022-11-21 13:28:01 -0500 | [diff] [blame] | 191 | }; |
| 192 | |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 193 | const handleSubmit = async (event: FormEvent) => { |
| 194 | event.preventDefault(); |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 195 | const usernameOk = usernameStatus === 'success'; |
| 196 | const passwordOk = passwordStatus === 'strong'; |
| 197 | |
| 198 | const canCreate = usernameOk && passwordOk; |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 199 | |
| 200 | if (canCreate) { |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 201 | createAccount(); |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 202 | } else { |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 203 | if (!usernameOk) { |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 204 | setUsernameStatus('registration_failed'); |
| 205 | } |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 206 | if (!passwordOk) { |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 207 | setPasswordStatus('registration_failed'); |
| 208 | } |
| 209 | } |
| 210 | }; |
| 211 | |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 212 | return ( |
| 213 | <> |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 214 | <ProcessingRequest open={loading} /> |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 215 | |
| 216 | <Stack |
| 217 | sx={{ |
| 218 | minHeight: `${isMobile ? 'auto' : '100%'}`, |
| 219 | display: 'flex', |
| 220 | alignItems: 'center', |
| 221 | justifyContent: 'center', |
| 222 | }} |
| 223 | > |
| 224 | <Box sx={{ mt: theme.typography.pxToRem(50), mb: theme.typography.pxToRem(20) }}> |
| 225 | <Typography component={'span'} variant="h2"> |
Michelle Sepkap Sime | 559cc80 | 2022-11-05 12:06:40 -0400 | [diff] [blame] | 226 | {t('registration_form_title')} |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 227 | </Typography> |
| 228 | </Box> |
| 229 | |
| 230 | <Form method="post" id="register-form"> |
| 231 | <div> |
| 232 | <UsernameInput |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 233 | value={username} |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 234 | onChange={handleUsername} |
simon | ab4eec8 | 2022-11-08 20:32:43 -0500 | [diff] [blame] | 235 | status={usernameStatus} |
Michelle Sepkap Sime | 559cc80 | 2022-11-05 12:06:40 -0400 | [diff] [blame] | 236 | tooltipTitle={t('registration_form_username_tooltip')} |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 237 | sx={{ width: theme.typography.pxToRem(inputWidth) }} |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 238 | /> |
| 239 | </div> |
| 240 | <div> |
| 241 | <PasswordInput |
Michelle Sepkap Sime | e580f42 | 2022-10-31 23:27:04 -0400 | [diff] [blame] | 242 | value={password} |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 243 | onChange={handlePassword} |
simon | ab4eec8 | 2022-11-08 20:32:43 -0500 | [diff] [blame] | 244 | status={passwordStatus} |
Michelle Sepkap Sime | 559cc80 | 2022-11-05 12:06:40 -0400 | [diff] [blame] | 245 | tooltipTitle={t('registration_form_password_tooltip')} |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 246 | sx={{ width: theme.typography.pxToRem(inputWidth) }} |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 247 | /> |
| 248 | </div> |
Gabriel Rochon | 7057b4f | 2022-11-21 13:28:01 -0500 | [diff] [blame] | 249 | <div> |
| 250 | <FormControl |
| 251 | sx={{ |
| 252 | width: theme.typography.pxToRem(inputWidth), |
| 253 | alignItems: 'center', |
| 254 | justifyContent: 'space-between', |
| 255 | }} |
| 256 | > |
Ziwei Wang | 9b4e2c1 | 2023-02-06 14:45:37 -0500 | [diff] [blame] | 257 | <RadioGroup row onChange={handleIsJams} defaultValue="jami"> |
| 258 | <FormControlLabel value="jami" control={<Radio />} label={t('jami')} /> |
| 259 | <FormControlLabel value="jams" control={<Radio />} label={t('jams')} /> |
Gabriel Rochon | 7057b4f | 2022-11-21 13:28:01 -0500 | [diff] [blame] | 260 | </RadioGroup> |
| 261 | </FormControl> |
| 262 | </div> |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 263 | |
| 264 | <Button |
| 265 | variant="contained" |
| 266 | type="submit" |
| 267 | onClick={handleSubmit} |
| 268 | sx={{ width: theme.typography.pxToRem(inputWidth), mt: theme.typography.pxToRem(20) }} |
| 269 | > |
Michelle Sepkap Sime | 559cc80 | 2022-11-05 12:06:40 -0400 | [diff] [blame] | 270 | {t('registration_form_submit_button')} |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 271 | </Button> |
| 272 | </Form> |
| 273 | |
| 274 | <Box sx={{ mt: theme.typography.pxToRem(50), mb: theme.typography.pxToRem(50) }}> |
| 275 | <Typography variant="body1"> |
Michelle Sepkap Sime | 559cc80 | 2022-11-05 12:06:40 -0400 | [diff] [blame] | 276 | {t('registration_form_to_login_text')} |
Ziwei Wang | 3ce1ac0 | 2023-02-03 11:59:03 -0500 | [diff] [blame] | 277 | <Link to={'/login'}>{t('registration_form_to_login_link')}</Link> |
Michelle Sepkap Sime | 51c0045 | 2022-10-31 21:26:38 -0400 | [diff] [blame] | 278 | </Typography> |
| 279 | </Box> |
| 280 | </Stack> |
| 281 | </> |
| 282 | ); |
| 283 | } |
Ziwei Wang | 3ce1ac0 | 2023-02-03 11:59:03 -0500 | [diff] [blame] | 284 | |
| 285 | export default withAuthUI(RegistrationForm); |