Web Page: Fix click showing both modal and page (#6626)
This commit is contained in:
parent
224670674a
commit
c2eb1abd3c
@ -125,14 +125,19 @@ const WebPage: FC<OwnProps & StateProps> = ({
|
|||||||
return parsedLink.timestamp;
|
return parsedLink.timestamp;
|
||||||
}, [webPage?.url]);
|
}, [webPage?.url]);
|
||||||
|
|
||||||
if (webPage?.webpageType !== 'full') return undefined;
|
const handleArticleClick = useLastCallback((e: React.MouseEvent) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
openUrl({ url: webPage.url!, shouldSkipModal: messageWebPage.isSafe });
|
||||||
|
});
|
||||||
|
|
||||||
const handleOpenTelegramLink = useLastCallback(() => {
|
const handleOpenTelegramLink = useLastCallback(() => {
|
||||||
openTelegramLink({
|
openTelegramLink({
|
||||||
url: webPage.url,
|
url: webPage.url!,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (webPage?.webpageType !== 'full') return undefined;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
siteName,
|
siteName,
|
||||||
url,
|
url,
|
||||||
@ -233,7 +238,7 @@ const WebPage: FC<OwnProps & StateProps> = ({
|
|||||||
{isArticle && (
|
{isArticle && (
|
||||||
<div
|
<div
|
||||||
className={buildClassName('WebPage-text', 'WebPage-text_interactive')}
|
className={buildClassName('WebPage-text', 'WebPage-text_interactive')}
|
||||||
onClick={() => openUrl({ url, shouldSkipModal: messageWebPage.isSafe })}
|
onClick={handleArticleClick}
|
||||||
>
|
>
|
||||||
<SafeLink className="site-name" url={url} text={siteName || displayUrl} />
|
<SafeLink className="site-name" url={url} text={siteName || displayUrl} />
|
||||||
{title && (
|
{title && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user