-
Notifications
You must be signed in to change notification settings - Fork 4
Mentor profile #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Mentor profile #49
Conversation
…peScript into mentor_profile
❌ Deploy Preview for brain-code failed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chyba prettier Ci nie działa prawidłowo, zweryfikuj to
src/App.tsx
Outdated
@@ -11,7 +11,7 @@ import { | |||
AddTeamPage, | |||
AllTeamProjectsPage, | |||
ContactPage, | |||
EmailVerificationPage, | |||
// EmailVerificationPage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do usunięcia?
src/App.tsx
Outdated
@@ -55,7 +55,7 @@ function App() { | |||
|
|||
<Route | |||
path={paths.emailVerification} | |||
element={<PublicRoute {...defaultPublicRouteProps} outlet={<EmailVerificationPage />} />} | |||
// element={<PublicRoute {...defaultPublicRouteProps} outlet={<EmailVerificationPage />} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jw, jeśli nie to dodaj TODO
src/components/Profile/Profile.tsx
Outdated
const [currentNameLang, setCurrentNameLang] = useState(); | ||
const [currentLevel, setCurrentLevel] = useState(); | ||
const [state, setState] = useState<IProgrammingLanguage>({ nameLang: currentNameLang , level: currentLevel }); | ||
const [programmingLanguage, setLanguages] = useState<Array<IProgrammingLanguage>>([]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
przenieś te hooki wyżej, tam gdzie wywołujesz resztę
src/components/Profile/Profile.tsx
Outdated
const handleClick = () => { | ||
setState(() => ({ | ||
nameLang: currentNameLang, | ||
level: currentLevel, | ||
})); | ||
setLanguages((prevState) => [...prevState, state]); | ||
console.log(programmingLanguage); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wysłałem na dc poprawioną funkcję
src/components/Profile/Profile.tsx
Outdated
|
||
const deleteLanguage = (index: number) => { | ||
programmingLanguage.splice(index,1); | ||
console.log(programmingLanguage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logi do usunięcia
src/components/Profile/Profile.tsx
Outdated
() => { | ||
navigate(paths.myProfile); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
() => navigate(paths.myProfile)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
można to zapisać w jednej lini
src/components/Profile/Profile.tsx
Outdated
() => { | ||
navigate(paths.myProfile); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jw
src/components/Profile/validate.ts
Outdated
// const lowercaseRegex = /(?=.*[a-z])/; | ||
// const uppercaseRegex = /(?=.*[A-Z])/; | ||
// const numericRegex = /(?=.*[0-9])/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do usunięcia lub dodaj TODO
src/components/Profile/validate.ts
Outdated
// 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`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jw
src/services/user.service.ts
Outdated
// export const getUser= async () => { | ||
// return await axios(`/project/user-projects`, { | ||
// method: "get", | ||
// headers: { | ||
// "x-auth-token": token, | ||
// }, | ||
// }); | ||
// }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jw
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. |
looks like everything works now :) |
zobacz czemu deploy nie działa |
No description provided.