diff --git a/src/shared/ui/banner.tsx b/src/shared/ui/banner.tsx index 90aa16d4..bb1e74f0 100644 --- a/src/shared/ui/banner.tsx +++ b/src/shared/ui/banner.tsx @@ -9,10 +9,10 @@ interface IBannerProps { } const Banner: FC = ({ className, src }) => { + const img = import.meta.env.VITE_BACKEND_DOMEN + '/ftp/avatars/' + src || banner return ( banner ) diff --git a/src/widgets/edit-account/ui/avatar-change/avatar-change.tsx b/src/widgets/edit-account/ui/avatar-change/avatar-change.tsx index d543d626..00cca070 100644 --- a/src/widgets/edit-account/ui/avatar-change/avatar-change.tsx +++ b/src/widgets/edit-account/ui/avatar-change/avatar-change.tsx @@ -1,3 +1,5 @@ +import { selectUser } from '@app/store/reducers/profileInfo/selectors' +import { useAppSelector } from '@shared/lib/hooks/store-hooks' import { Input } from '@shared/ui/input' import { UserAvatar } from '@shared/ui/user-avatar' import { useEffect, useState, type FC } from 'react' @@ -6,6 +8,7 @@ import { handleFileChange } from '../../lib/handle-file-change' const AvatarChange: FC = () => { const { control } = useFormContext() + const user = useAppSelector(selectUser) return ( {
- +