Implement user registration and login on frontend#24
Implement user registration and login on frontend#24Vikort wants to merge 3 commits intoostis-dev:mainfrom
Conversation
deniskoronchik
left a comment
There was a problem hiding this comment.
Request some changes
web/frontend/package.json
Outdated
| "redux": "^4.1.1", | ||
| "redux-devtools-extension": "^2.13.9" | ||
| "redux-devtools-extension": "^2.13.9", | ||
| "redux-thunk": "^2.4.0", |
There was a problem hiding this comment.
Why we need this package?
There was a problem hiding this comment.
I thought to use async actions when submitting the form, but when I wrote them, they worked exactly the same as sync actions.
Forgot to remove from package.json
web/frontend/package.json
Outdated
| "dependencies": { | ||
| "@material-ui/core": "^4.12.3", | ||
| "@material-ui/icons": "^4.11.2", | ||
| "axios": "^0.24.0", |
There was a problem hiding this comment.
Why we need this? Let's do not use additional libraries for base http fucnitons.
web/frontend/package.json
Outdated
| "@material-ui/core": "^4.12.3", | ||
| "@material-ui/icons": "^4.11.2", | ||
| "axios": "^0.24.0", | ||
| "formik": "^2.2.9", |
There was a problem hiding this comment.
Same question: why we need this dependency?
There was a problem hiding this comment.
Didn't know how to do form validation, used what was in the template
Redesigned validation, removed formik
web/frontend/package.json
Outdated
| "redux-devtools-extension": "^2.13.9", | ||
| "redux-thunk": "^2.4.0", | ||
| "uuid": "^8.3.2", | ||
| "yup": "^0.32.11" |
There was a problem hiding this comment.
Same there. We don't need additional dependency to replace simple regexp values.
| export const ChangePassword = 'USER_CHANGE_PASSWORD'; | ||
| export const ChangeOnline = 'USER_CHANGE_ONLINE'; | ||
| export const ChangeAccessToken = 'USER_CHANGE_ACCESS_TOKEN'; | ||
| export const UpdateAfterSubmit = 'USER_UPDATE_AFTER_SUBMIT'; |
There was a problem hiding this comment.
Why we need so much actions?
There was a problem hiding this comment.
Didn't know I could do this
{...state, ...action.payload}
web/frontend/src/ui/RegisterPage.tsx
Outdated
| const uuid = uuidv4() | ||
|
|
||
| return ( | ||
| <> |
web/frontend/src/ui/RegisterPage.tsx
Outdated
| login: Yup.string().max(255).required('Login is required'), | ||
| firstName: Yup.string().max(255).required('First name is required'), | ||
| lastName: Yup.string().max(255).required('Last name is required'), | ||
| password: Yup.string().max(255).required('Password is required') |
web/frontend/src/ui/RegisterPage.tsx
Outdated
| }) | ||
| } | ||
| onSubmit={() => { | ||
| axiosInstance.post('',{ |
web/frontend/src/ui/RegisterPage.tsx
Outdated
| </Formik> | ||
| </Container> | ||
| </Box> | ||
| </> |
There was a problem hiding this comment.
Please split to separate functions.
There was a problem hiding this comment.
How to split it? Split the container from the form?
|
|
||
| .loader-container { | ||
| height: 100%; | ||
| height: 94%; |
There was a problem hiding this comment.
Because if leave 100%, a scroll appears
deniskoronchik
left a comment
There was a problem hiding this comment.
Request some changes
122ea8a to
4fd77c0
Compare
Resolves #22