mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Hide copy link feature when there's no offer code (#19335)
fixes PROD-253
This commit is contained in:
parent
0a5c61acb2
commit
03fd494e84
2 changed files with 4 additions and 4 deletions
|
@ -305,7 +305,7 @@ const Sidebar: React.FC<SidebarProps> = ({tierOptions,
|
|||
|
||||
<TextField
|
||||
error={Boolean(errors.code)}
|
||||
hint={errors.code || <div className='flex items-center justify-between'><div>{homepageUrl}<span className='font-bold'>{overrides.code.value}</span></div><span></span><Button className='text-xs' color='green' label={`${isCopied ? 'Copied' : 'Copy'}`} size='sm' link onClick={handleCopyClick} /></div>}
|
||||
hint={errors.code || (overrides.code.value !== '' ? <div className='flex items-center justify-between'><div>{homepageUrl}<span className='font-bold'>{overrides.code.value}</span></div><span></span><Button className='text-xs' color='green' label={`${isCopied ? 'Copied' : 'Copy'}`} size='sm' link onClick={handleCopyClick} /></div> : null)}
|
||||
placeholder='black-friday'
|
||||
title='Offer code'
|
||||
value={overrides.code.value}
|
||||
|
|
|
@ -152,7 +152,7 @@ const Sidebar: React.FC<{
|
|||
/>
|
||||
<TextField
|
||||
error={Boolean(errors.code)}
|
||||
hint={errors.code || <div className='flex items-center justify-between'><div>{homepageUrl}<span className='font-bold'>{offer?.code}</span></div><span></span><Button className='text-xs' color='green' label={`${isCopied ? 'Copied' : 'Copy'}`} size='sm' link onClick={handleCopyClick} /></div>}
|
||||
hint={errors.code || (offer?.code !== '' ? <div className='flex items-center justify-between'><div>{homepageUrl}<span className='font-bold'>{offer?.code}</span></div><span></span><Button className='text-xs' color='green' label={`${isCopied ? 'Copied' : 'Copy'}`} size='sm' link onClick={handleCopyClick} /></div> : null)}
|
||||
placeholder='black-friday'
|
||||
title='Offer code'
|
||||
value={offer?.code}
|
||||
|
|
Loading…
Reference in a new issue