Fixed: (UI) Replace `api.` only if it's a subdomain

pull/1452/head
Bogdan 1 year ago
parent db84e82779
commit 65a954b831

@ -226,7 +226,7 @@ function IndexerIndexRow(props: IndexerIndexRowProps) {
className={styles.externalLink}
name={icons.EXTERNAL_LINK}
title={translate('Website')}
to={baseUrl.replace('api.', '')}
to={baseUrl.replace(/(:\/\/)api\./, '$1')}
/>
) : null}

@ -124,7 +124,9 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) {
{translate('IndexerSite')}
</DescriptionListItemTitle>
<DescriptionListItemDescription>
<Link to={baseUrl}>{baseUrl.replace('api.', '')}</Link>
<Link to={baseUrl}>
{baseUrl.replace(/(:\/\/)api\./, '$1')}
</Link>
</DescriptionListItemDescription>
<DescriptionListItemTitle>{`${
protocol === 'usenet' ? 'Newznab' : 'Torznab'

Loading…
Cancel
Save