don't show external link modal for lbry links
This commit is contained in:
parent
6659ef50ff
commit
c9fdaec997
1 changed files with 7 additions and 2 deletions
|
@ -73,15 +73,20 @@ function MarkdownLink(props: Props) {
|
|||
simpleLinks ||
|
||||
(protocol && (protocol[0] === 'http:' || protocol[0] === 'https:' || protocol[0] === 'mailto:'))
|
||||
) {
|
||||
const isLbryLink = href.startsWith('lbry://');
|
||||
|
||||
element = (
|
||||
<Button
|
||||
button="link"
|
||||
iconRight={ICONS.EXTERNAL}
|
||||
iconRight={isLbryLink ? undefined : ICONS.EXTERNAL}
|
||||
title={title || decodedUri}
|
||||
label={children}
|
||||
className="button--external-link"
|
||||
navigate={isLbryLink ? href : undefined}
|
||||
onClick={() => {
|
||||
openModal(MODALS.CONFIRM_EXTERNAL_RESOURCE, { uri: href, isTrusted: false });
|
||||
if (!isLbryLink) {
|
||||
openModal(MODALS.CONFIRM_EXTERNAL_RESOURCE, { uri: href, isTrusted: false });
|
||||
}
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue