GdprBanner: conditionally show "Learn more" button

This commit is contained in:
Alex Gleason 2022-07-26 11:15:04 -05:00
parent d422bdf3d3
commit 4f0e104fc4
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -44,9 +44,13 @@ const GdprBanner: React.FC = () => {
</Stack>
<HStack space={2} justifyContent='end'>
<Button theme='secondary' to='/login'>
<FormattedMessage id='gdpr.learn_more' defaultMessage='Learn more' />
</Button>
{soapbox.gdprUrl && (
<a href={soapbox.gdprUrl} tabIndex={-1} className='inline-flex'>
<Button theme='secondary'>
<FormattedMessage id='gdpr.learn_more' defaultMessage='Learn more' />
</Button>
</a>
)}
<Button theme='accent' onClick={handleAccept}>
<FormattedMessage id='gdpr.accept' defaultMessage='Accept' />