Skip to content

Commit

Permalink
Merge pull request #61 from WildCodeSchool/fix/s06_all_fixes-pre-staging
Browse files Browse the repository at this point in the history
fix siret and company name in profile
  • Loading branch information
Dolpheus89 authored Feb 6, 2025
2 parents 24f1745 + a2117bd commit d0e7154
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/src/pages/Profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ function Profile() {
if (view === "personal") {
if (emailRef.current) emailRef.current.value = user.email || "";
if (phoneRef.current) phoneRef.current.value = user.phone_number || "";
if (siretRef.current) siretRef.current.value = user.siret || "";
if (companyNameRef.current)
if (siretRef.current && user.role === "trainer")
siretRef.current.value = user.siret || "";
if (companyNameRef.current && user.role === "trainer")
companyNameRef.current.value = user.company_name || "";
}
}, [user, navigate, view]);
Expand Down

0 comments on commit d0e7154

Please sign in to comment.