pl-fe: Add title to application name link

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-10-21 21:16:11 +02:00
parent b7a7ea4027
commit c87d0a16a1

View file

@ -1,5 +1,5 @@
import React, { useRef } from 'react';
import { FormattedDate, FormattedMessage, useIntl } from 'react-intl';
import { defineMessages, FormattedDate, FormattedMessage, useIntl } from 'react-intl';
import { Link } from 'react-router-dom';
import Account from 'pl-fe/components/account';
@ -22,6 +22,10 @@ import StatusTypeIcon from './status-type-icon';
import type { SelectedStatus } from 'pl-fe/selectors';
const messages = defineMessages({
applicationName: { id: 'status.application_name', defaultMessage: 'Sent form {name}' },
});
interface IDetailedStatus {
status: SelectedStatus;
withMedia?: boolean;
@ -152,8 +156,14 @@ const DetailedStatus: React.FC<IDetailedStatus> = ({
{actualStatus.application && (
<>
{' · '}
<a href={(actualStatus.application.website) ? actualStatus.application.website : '#'} target='_blank' rel='noopener' className='hover:underline'>
({actualStatus.application.name})
<a
href={(actualStatus.application.website) ? actualStatus.application.website : '#'}
target='_blank'
rel='noopener'
className='hover:underline'
title={intl.formatMessage(messages.applicationName, { name: actualStatus.application.name })}
>
{actualStatus.application.name}
</a>
</>
)}