From f55e32c822f62a84f91545ebf53d94ee52f6d24d Mon Sep 17 00:00:00 2001 From: Pasichnichenkoilya Date: Fri, 26 Jul 2024 16:14:19 +0300 Subject: [PATCH] Rewrote ProfileContainerMobile to tsx --- ...rMobile.jsx => ProfileContainerMobile.tsx} | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) rename src/containers/user-profile/profile-info/{ProfileContainerMobile.jsx => ProfileContainerMobile.tsx} (76%) diff --git a/src/containers/user-profile/profile-info/ProfileContainerMobile.jsx b/src/containers/user-profile/profile-info/ProfileContainerMobile.tsx similarity index 76% rename from src/containers/user-profile/profile-info/ProfileContainerMobile.jsx rename to src/containers/user-profile/profile-info/ProfileContainerMobile.tsx index 7870fb68d..4f27b26d7 100644 --- a/src/containers/user-profile/profile-info/ProfileContainerMobile.jsx +++ b/src/containers/user-profile/profile-info/ProfileContainerMobile.tsx @@ -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' @@ -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, @@ -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 ( - +