From 6e48961756bbaecdc729da401cf6a089554f7f84 Mon Sep 17 00:00:00 2001
From: Arya Khochare <91268931+Aryakoste@users.noreply.github.com>
Date: Mon, 29 Jul 2024 00:27:30 +0530
Subject: [PATCH] [MM-59331] Migrate tooltips of
"components/post_view/post_attachment_opengraph/post_attachment_opengraph.tsx"
to WithTooltip (#27617)
---
.../post_attachment_opengraph.tsx | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/webapp/channels/src/components/post_view/post_attachment_opengraph/post_attachment_opengraph.tsx b/webapp/channels/src/components/post_view/post_attachment_opengraph/post_attachment_opengraph.tsx
index ed35492c4b..ec877776e2 100644
--- a/webapp/channels/src/components/post_view/post_attachment_opengraph/post_attachment_opengraph.tsx
+++ b/webapp/channels/src/components/post_view/post_attachment_opengraph/post_attachment_opengraph.tsx
@@ -16,10 +16,9 @@ import type {
import AutoHeightSwitcher from 'components/common/auto_height_switcher';
import ExternalImage from 'components/external_image';
import ExternalLink from 'components/external_link';
-import OverlayTrigger from 'components/overlay_trigger';
-import Tooltip from 'components/tooltip';
+import WithTooltip from 'components/with_tooltip';
-import Constants, {PostTypes} from 'utils/constants';
+import {PostTypes} from 'utils/constants';
import {isSystemMessage} from 'utils/post_utils';
import {makeUrlSafe} from 'utils/url';
@@ -119,12 +118,6 @@ const PostAttachmentOpenGraph = ({openGraphData, post, actions, link, isInPermal
return actions.editPost(patchedPost);
};
- const removeButtonTooltip = (
-
- {formatMessage({id: 'link_preview.remove_link_preview', defaultMessage: 'Remove link preview'})}
-
- );
-
const safeLink = makeUrlSafe(openGraphData?.url || link);
return (
@@ -136,10 +129,10 @@ const PostAttachmentOpenGraph = ({openGraphData, post, actions, link, isInPermal
location='post_attachment_opengraph'
>
{rest.currentUserId === post.user_id && !isInPermalink && (
-
-
+
)}