From 79461886334b29dcb944df00b0a9b60318739334 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Thu, 25 Nov 2021 15:48:17 -0300 Subject: [PATCH] Extract Sourcify logo component --- src/AddressTransactions.tsx | 10 ++-------- src/components/DecoratedAddressLink.tsx | 10 ++-------- src/sourcify/SourcifyLogo.tsx | 14 ++++++++++++++ src/{ => sourcify}/sourcify.svg | 0 4 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 src/sourcify/SourcifyLogo.tsx rename src/{ => sourcify}/sourcify.svg (100%) diff --git a/src/AddressTransactions.tsx b/src/AddressTransactions.tsx index ea2baa3..1850479 100644 --- a/src/AddressTransactions.tsx +++ b/src/AddressTransactions.tsx @@ -16,12 +16,12 @@ import StandardFrame from "./StandardFrame"; import StandardSubtitle from "./StandardSubtitle"; import Copy from "./components/Copy"; import NavTab from "./components/NavTab"; +import SourcifyLogo from "./sourcify/SourcifyLogo"; import AddressTransactionResults from "./address/AddressTransactionResults"; import Contracts from "./address/Contracts"; import { RuntimeContext } from "./useRuntime"; import { useAppConfigContext } from "./useAppConfig"; import { useSingleMetadata } from "./useSourcify"; -import SourcifyLogo from "./sourcify.svg"; const AddressTransactions: React.FC = () => { const { provider } = useContext(RuntimeContext); @@ -143,13 +143,7 @@ const AddressTransactions: React.FC = () => { ) : ( - Sourcify logo + )} diff --git a/src/components/DecoratedAddressLink.tsx b/src/components/DecoratedAddressLink.tsx index 333e1ff..c92ed98 100644 --- a/src/components/DecoratedAddressLink.tsx +++ b/src/components/DecoratedAddressLink.tsx @@ -7,10 +7,10 @@ import { faMoneyBillAlt } from "@fortawesome/free-solid-svg-icons/faMoneyBillAlt import { faBurn } from "@fortawesome/free-solid-svg-icons/faBurn"; import { faCoins } from "@fortawesome/free-solid-svg-icons/faCoins"; import AddressOrENSName from "./AddressOrENSName"; +import SourcifyLogo from "../sourcify/SourcifyLogo"; import { AddressContext, ZERO_ADDRESS } from "../types"; import { ResolvedAddresses } from "../api/address-resolver"; import { Metadata } from "../useSourcify"; -import SourcifyLogo from "../sourcify.svg"; type DecoratedAddressLinkProps = { address: string; @@ -80,13 +80,7 @@ const DecoratedAddressLink: React.FC = ({ className="self-center flex-shrink-0 flex items-center" to={`/address/${address}/contract`} > - Sourcify logo + )} ( + Sourcify logo +); + +export default SourcifyLogo; diff --git a/src/sourcify.svg b/src/sourcify/sourcify.svg similarity index 100% rename from src/sourcify.svg rename to src/sourcify/sourcify.svg