0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Handled missing user cover image

closes https://github.com/TryGhost/Ghost/issues/21350

Without this we would attempt to render load the url `null`
This commit is contained in:
Mithelan Devanandan 2024-10-25 13:58:12 +05:30 committed by GitHub
parent 66b1cb0db2
commit 96e75ac0e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -362,9 +362,10 @@ const UserDetailModalContent: React.FC<{user: User}> = ({user}) => {
>
<div>
<div className={`relative ${canAccessSettings(currentUser) ? '-mx-8 -mt-8 rounded-t' : '-mx-10 -mt-10'} bg-gradient-to-tr from-grey-900 to-black`}>
<div className='flex min-h-[40vmin] flex-wrap items-end justify-between bg-cover bg-center' style={{
backgroundImage: `url(${formState.cover_image})`
}}>
<div className='flex min-h-[40vmin] flex-wrap items-end justify-between bg-cover bg-center'
style={{
backgroundImage: formState.cover_image ? `url(${formState.cover_image})` : 'none'
}}>
<div className='flex w-full max-w-[620px] flex-col gap-5 p-8 md:max-w-[auto] md:flex-row md:items-center'>
<div>
<ImageUpload