From c4fa544083d31129fc6b37446c8ed82121131c05 Mon Sep 17 00:00:00 2001 From: Kazuma Tsuchiya Date: Fri, 18 Oct 2024 18:24:26 +0900 Subject: [PATCH] link to assets and reference icon --- .../Common/LinkAssetModal/LinkAssetModal.tsx | 15 ++++----------- .../Common/ResizableProTable/index.tsx | 4 ++++ .../molecules/Content/LinkItemModal/index.tsx | 19 ++++++------------- .../LinkItemRequestModal.tsx | 4 +--- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/web/src/components/molecules/Common/LinkAssetModal/LinkAssetModal.tsx b/web/src/components/molecules/Common/LinkAssetModal/LinkAssetModal.tsx index c21340cba..774111e9e 100644 --- a/web/src/components/molecules/Common/LinkAssetModal/LinkAssetModal.tsx +++ b/web/src/components/molecules/Common/LinkAssetModal/LinkAssetModal.tsx @@ -1,5 +1,5 @@ import styled from "@emotion/styled"; -import { useState, useRef, useCallback, useMemo } from "react"; +import { useRef, useCallback, useMemo } from "react"; import Button from "@reearth-cms/components/atoms/Button"; import Icon from "@reearth-cms/components/atoms/Icon"; @@ -74,7 +74,6 @@ const LinkAssetModal: React.FC = ({ onUploadAndLink, }) => { const t = useT(); - const [hoveredAssetId, setHoveredAssetId] = useState(); const resetFlag = useRef(false); const options: OptionConfig = useMemo( @@ -127,14 +126,10 @@ const LinkAssetModal: React.FC = ({ width: 48, minWidth: 48, render: (_, asset) => { - const isLink = - (asset.id === linkedAsset?.id && hoveredAssetId !== asset.id) || - (asset.id !== linkedAsset?.id && hoveredAssetId === asset.id); + const isLink = asset.id !== linkedAsset?.id; return (