Skip to content

Commit

Permalink
fix: banner in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Barresi committed Apr 16, 2024
1 parent e8138fe commit f9badb8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/widgets/edit-account/ui/banner-change/banner-change.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ const BannerChange: FC = () => {
setPreviewUrl(null)
}
}, [value])

const [bannerImg, setBannerImg] = useState<string | null>(null)
useEffect(() => {
setBannerImg(previewUrl || user?.banner || null)
}, [previewUrl, user])
return (
<div className='relative flex-grow h-[120px] usm:h-full w-full'>
<Banner src={previewUrl || user?.banner || null} />
<Banner src={bannerImg || null} />
<Button
variant='secondary'
className='absolute bottom-[40px] right-[50%] translate-x-[50%] usm:translate-x-0 usm:right-[20px] usm:bottom-[20px] w-[190px] h-[40px] lg:right-[30px] lg:bottom-[30px] xxl:right-[20px]'
Expand Down

0 comments on commit f9badb8

Please sign in to comment.