fallback to link.url

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-11-30 16:57:21 +01:00
parent 1de5a69f8b
commit 6435f33af9

View file

@ -121,8 +121,8 @@ const EventInformation: React.FC<IEventInformation> = ({ params }) => {
{status.event.links.map(link => ( {status.event.links.map(link => (
<HStack space={2} alignItems='center'> <HStack space={2} alignItems='center'>
<Icon src={require('@tabler/icons/link.svg')} /> <Icon src={require('@tabler/icons/link.svg')} />
<a href={link.remote_url} className='text-primary-600 dark:text-accent-blue hover:underline' target='_blank'> <a href={link.remote_url || link.url} className='text-primary-600 dark:text-accent-blue hover:underline' target='_blank'>
{link.remote_url.replace(/^https?:\/\//, '')} {(link.remote_url || link.url).replace(/^https?:\/\//, '')}
</a> </a>
</HStack> </HStack>
))} ))}