Skip to content

Commit

Permalink
Rewrote ProfileContainerMobile to tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ipasic-softserve committed Jul 29, 2024
1 parent 509d3a5 commit f55e32c
Showing 1 changed file with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ReactNode } from 'react'

import Box from '@mui/material/Box'
import SchoolIcon from '@mui/icons-material/School'
import DoneIcon from '@mui/icons-material/Done'
Expand All @@ -8,6 +10,17 @@ import AppChipList from '~/components/app-chips-list/AppChipList'
import ProfileDoneItemsList from '~/components/icon-with-text-list/ProfileDoneItemsList'

import { styles } from '~/containers/user-profile/profile-info/ProfileInfo.styles'
import { UserResponse } from '~/types'

interface ProfileContainerMobileProps {
actionIcon: ReactNode
accInfo: ReactNode
buttonGroup: ReactNode
defaultQuantity: number
doneItems: number
userData: UserResponse
chipItems: string[]
}

const ProfileContainerMobile = ({
actionIcon,
Expand All @@ -17,18 +30,15 @@ const ProfileContainerMobile = ({
doneItems,
userData,
chipItems
}) => {
}: ProfileContainerMobileProps) => {
const avatarSrc = userData.photo
? `${import.meta.env.VITE_APP_IMG_USER_URL}${userData.photo}`
: ''
return (
<Box sx={styles.container}>
<Box sx={styles.wrapperForPhoto}>
<Box sx={styles.avatarContainerMobile}>
<Avatar
src={
userData.photo &&
`${import.meta.env.VITE_APP_IMG_USER_URL}${userData.photo}`
}
sx={styles.img}
/>
<Avatar src={avatarSrc} sx={styles.img} />
</Box>

<TitleWithDescription
Expand Down

0 comments on commit f55e32c

Please sign in to comment.