Open
Conversation
…peScript into mentor_profile
❌ Deploy Preview for brain-code failed.
|
TenGosc007
reviewed
May 22, 2022
Member
TenGosc007
left a comment
There was a problem hiding this comment.
chyba prettier Ci nie działa prawidłowo, zweryfikuj to
src/App.tsx
Outdated
| AllTeamProjectsPage, | ||
| ContactPage, | ||
| EmailVerificationPage, | ||
| // EmailVerificationPage, |
src/App.tsx
Outdated
| <Route | ||
| path={paths.emailVerification} | ||
| element={<PublicRoute {...defaultPublicRouteProps} outlet={<EmailVerificationPage />} />} | ||
| // element={<PublicRoute {...defaultPublicRouteProps} outlet={<EmailVerificationPage />} />} |
src/components/Profile/Profile.tsx
Outdated
Comment on lines
64
to
67
| const [currentNameLang, setCurrentNameLang] = useState(); | ||
| const [currentLevel, setCurrentLevel] = useState(); | ||
| const [state, setState] = useState<IProgrammingLanguage>({ nameLang: currentNameLang , level: currentLevel }); | ||
| const [programmingLanguage, setLanguages] = useState<Array<IProgrammingLanguage>>([]); |
Member
There was a problem hiding this comment.
przenieś te hooki wyżej, tam gdzie wywołujesz resztę
Comment on lines
69
to
76
| const handleClick = () => { | ||
| setState(() => ({ | ||
| nameLang: currentNameLang, | ||
| level: currentLevel, | ||
| })); | ||
| setLanguages((prevState) => [...prevState, state]); | ||
| console.log(programmingLanguage); | ||
| }; |
Member
There was a problem hiding this comment.
wysłałem na dc poprawioną funkcję
src/components/Profile/Profile.tsx
Outdated
|
|
||
| const deleteLanguage = (index: number) => { | ||
| programmingLanguage.splice(index,1); | ||
| console.log(programmingLanguage); |
src/components/Profile/Profile.tsx
Outdated
Comment on lines
115
to
117
| () => { | ||
| navigate(paths.myProfile); | ||
| } |
Member
There was a problem hiding this comment.
() => navigate(paths.myProfile)
Member
There was a problem hiding this comment.
można to zapisać w jednej lini
src/components/Profile/Profile.tsx
Outdated
Comment on lines
122
to
124
| () => { | ||
| navigate(paths.myProfile); | ||
| } |
src/components/Profile/validate.ts
Outdated
Comment on lines
4
to
6
| // const lowercaseRegex = /(?=.*[a-z])/; | ||
| // const uppercaseRegex = /(?=.*[A-Z])/; | ||
| // const numericRegex = /(?=.*[0-9])/; |
src/components/Profile/validate.ts
Outdated
Comment on lines
13
to
21
| // newPassword: Yup.string() | ||
| // .matches(lowercaseRegex, t`registration.validation.passwordLow`) | ||
| // .matches(uppercaseRegex, t`registration.validation.passwordUpp`) | ||
| // .matches(numericRegex, t`registration.validation.passwordNum`) | ||
| // .min(8, t`registration.validation.passwordMin`) | ||
| // .required(t`registration.validation.passwordReq`), | ||
| // confirmNewPassword: Yup.string() | ||
| // .oneOf([Yup.ref("newPassword")], t`registration.validation.confirmPassword`) | ||
| // .required(t`registration.validation.passwordReq`), |
src/services/user.service.ts
Outdated
Comment on lines
13
to
20
| // export const getUser= async () => { | ||
| // return await axios(`/project/user-projects`, { | ||
| // method: "get", | ||
| // headers: { | ||
| // "x-auth-token": token, | ||
| // }, | ||
| // }); | ||
| // }; |
Contributor
Author
|
I've made some changes but, there's still problem with deleting languages - once you have just one language it's ok, but if you have more and attempt to delete a particular one, it will delete more of them - can't figure why. |
Contributor
Author
|
looks like everything works now :) |
Member
|
zobacz czemu deploy nie działa |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.