From 2b1e19ed3ce6a94016930a61848bb8dc3d983ebd Mon Sep 17 00:00:00 2001 From: Olli Kauppinen Date: Mon, 2 Dec 2024 11:19:06 +0200 Subject: [PATCH] remove tooltip from copy button and eslint fixes --- .../mydata/view/embedded/SnippetPopup.jsx | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/bundles/framework/mydata/view/embedded/SnippetPopup.jsx b/bundles/framework/mydata/view/embedded/SnippetPopup.jsx index aa9c4ada6d..83a1b2b098 100644 --- a/bundles/framework/mydata/view/embedded/SnippetPopup.jsx +++ b/bundles/framework/mydata/view/embedded/SnippetPopup.jsx @@ -1,7 +1,6 @@ - import React, { useState } from 'react'; import PropTypes from 'prop-types'; -import { Message, Tooltip, CopyField } from 'oskari-ui'; +import { Message, CopyField } from 'oskari-ui'; import styled from 'styled-components'; import { SecondaryButton, ButtonContainer, CopyButton } from 'oskari-ui/components/buttons'; import { showPopup } from 'oskari-ui/components/window'; @@ -16,7 +15,7 @@ const Content = styled.div` margin: 12px 24px 24px; `; -const SnippetPopup = ({html, onClose}) => { +const SnippetPopup = ({ html, onClose }) => { const [highlighted, setHighlighted] = useState(false); const highlightUrl = () => { @@ -24,7 +23,7 @@ const SnippetPopup = ({html, onClose}) => { setTimeout(() => { setHighlighted(false); }, 1000); - } + }; return ( @@ -35,16 +34,17 @@ const SnippetPopup = ({html, onClose}) => { /> - }> - highlightUrl()} - /> - + highlightUrl()}/> ); }; +SnippetPopup.propTypes = { + html: PropTypes.string.isRequired, + onClose: PropTypes.func.isRequired +}; export const showSnippetPopup = (view, onClose) => { const title = ; @@ -68,9 +68,4 @@ export const showSnippetPopup = (view, onClose) => { ); return showPopup(title, content, onClose, POPUP_OPTIONS); -} - -showSnippetPopup.propTypes = { - view: PropTypes.object, - onClose: PropTypes.func.isRequired };