diff --git a/web/src/components/atoms/Icon/Icons/arrowUpRightSlash.svg b/web/src/components/atoms/Icon/Icons/arrowUpRightSlash.svg new file mode 100644 index 000000000..fafb0dfd5 --- /dev/null +++ b/web/src/components/atoms/Icon/Icons/arrowUpRightSlash.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/src/components/atoms/Icon/icons.ts b/web/src/components/atoms/Icon/icons.ts index 78223bb23..ae9937386 100644 --- a/web/src/components/atoms/Icon/icons.ts +++ b/web/src/components/atoms/Icon/icons.ts @@ -56,6 +56,7 @@ import { import ArrowSquareOut from "./Icons/arrowSquareOut.svg"; import ArrowUpRight from "./Icons/arrowUpRight.svg"; +import ArrowUpRightSlash from "./Icons/arrowUpRightSlash.svg"; import Asset from "./Icons/asset.svg"; import Boolean from "./Icons/boolean.svg"; import CheckSquare from "./Icons/checkSquare.svg"; @@ -124,6 +125,7 @@ export default { asset: Asset, listBullets: ListBullets, arrowUpRight: ArrowUpRight, + arrowUpRightSlash: ArrowUpRightSlash, numberNine: NumberNine, link: Link, linkSolid: LinkSolid, 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 (