Skip to content

Commit

Permalink
fix: use TextOutput instead of Link for source
Browse files Browse the repository at this point in the history
  • Loading branch information
samshara authored and frozenhelium committed Dec 19, 2023
1 parent d05068e commit ddb4b0b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"namespace": "CountryNSDirectory",
"strings": {
"countryNSDirectoryTitle": "NS Directory",
"countryNSDirectorySource": "Source: {sourceLink}"
"countryNSDirectorySource": "Source"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import TextOutput from '#components/TextOutput';
import Link from '#components/Link';
import useTranslation from '#hooks/useTranslation';
import { type CountryOutletContext } from '#utils/outletContext';
import { resolveToString } from '#utils/translation';

import styles from './styles.module.css';
import i18n from './i18n.json';
Expand Down Expand Up @@ -33,17 +32,19 @@ function NationalSocietyDirectory() {
))}
</div>
<div className={styles.nationalSocietySource}>
<Link
variant="tertiary"
href={countryResponse?.society_url}
external
withUnderline
>
{resolveToString(
strings.countryNSDirectorySource,
{ sourceLink: countryResponse?.society_name },
<TextOutput
label={strings.countryNSDirectorySource}
value={(
<Link
variant="tertiary"
href={countryResponse?.society_url}
external
withUnderline
>
{countryResponse?.society_name}
</Link>
)}
</Link>
/>
</div>
</>
</Container>
Expand Down

0 comments on commit ddb4b0b

Please sign in to comment.