Skip to content

Commit

Permalink
added curly braces for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
dudchakk committed Nov 28, 2024
1 parent cedb6fe commit 783bc40
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/pages/edit-profile/EditProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ const EditProfile = () => {

const dataToUpdate: UpdateUserParams = rest

if (city && country) dataToUpdate.address = { city, country }
if (city && country) {
dataToUpdate.address = { city, country }
}

if (typeof videoLink === 'string' || typeof videoLink === 'undefined') {
dataToUpdate.videoLink = videoLink ?? ''
Expand All @@ -163,14 +165,17 @@ const EditProfile = () => {
videoLink[userRole as keyof typeof videoLink] || ''
}

if (notificationSettings)
if (notificationSettings) {
dataToUpdate.notificationSettings = profileState.notificationSettings
}

if (professionalBlock)
if (professionalBlock) {
dataToUpdate.professionalBlock = profileState.professionalBlock
}

if (aboutStudent) dataToUpdate.aboutStudent = aboutStudent

if (aboutStudent) {
dataToUpdate.aboutStudent = aboutStudent
}
if (categories) {
dataToUpdate.mainSubjects = categories
}
Expand Down

0 comments on commit 783bc40

Please sign in to comment.