Rename component
This commit is contained in:
parent
dfcbc1a150
commit
a76a2d71a2
|
@ -21,7 +21,7 @@ import StandardFrame from "./StandardFrame";
|
|||
import StandardSubtitle from "./StandardSubtitle";
|
||||
import Copy from "./components/Copy";
|
||||
import ContentFrame from "./ContentFrame";
|
||||
import CustomTab from "./components/Tab";
|
||||
import NavTab from "./components/NavTab";
|
||||
import Contracts from "./address/Contracts";
|
||||
import UndefinedPageControl from "./search/UndefinedPageControl";
|
||||
import ResultHeader from "./search/ResultHeader";
|
||||
|
@ -217,14 +217,14 @@ const AddressTransactions: React.FC = () => {
|
|||
<Tab.Group>
|
||||
<Tab.List className="flex space-x-2 border-l border-r border-t rounded-t-lg bg-white">
|
||||
<Tab as={Fragment}>
|
||||
<CustomTab href={`/address/${checksummedAddress}`}>
|
||||
<NavTab href={`/address/${checksummedAddress}`}>
|
||||
Overview
|
||||
</CustomTab>
|
||||
</NavTab>
|
||||
</Tab>
|
||||
<Tab as={Fragment}>
|
||||
<CustomTab href={`/address/${checksummedAddress}/contract`}>
|
||||
<NavTab href={`/address/${checksummedAddress}/contract`}>
|
||||
Contract
|
||||
</CustomTab>
|
||||
</NavTab>
|
||||
</Tab>
|
||||
</Tab.List>
|
||||
<Tab.Panels>
|
||||
|
|
|
@ -4,7 +4,7 @@ import StandardFrame from "./StandardFrame";
|
|||
import StandardSubtitle from "./StandardSubtitle";
|
||||
import ContentFrame from "./ContentFrame";
|
||||
import TabGroup from "./components/TabGroup";
|
||||
import Tab from "./components/Tab";
|
||||
import NavTab from "./components/NavTab";
|
||||
import Details from "./transaction/Details";
|
||||
import Logs from "./transaction/Logs";
|
||||
import { RuntimeContext } from "./useRuntime";
|
||||
|
@ -57,11 +57,11 @@ const Transaction: React.FC = () => {
|
|||
{txData && (
|
||||
<SelectionContext.Provider value={selectionCtx}>
|
||||
<TabGroup>
|
||||
<Tab href={`/tx/${txhash}`}>Overview</Tab>
|
||||
<NavTab href={`/tx/${txhash}`}>Overview</NavTab>
|
||||
{txData.confirmedData?.blockNumber !== undefined && (
|
||||
<Tab href={`/tx/${txhash}/logs`}>
|
||||
<NavTab href={`/tx/${txhash}/logs`}>
|
||||
Logs{txData && ` (${txData.confirmedData?.logs?.length ?? 0})`}
|
||||
</Tab>
|
||||
</NavTab>
|
||||
)}
|
||||
</TabGroup>
|
||||
<Switch>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import React from "react";
|
||||
import { NavLink } from "react-router-dom";
|
||||
|
||||
type TabProps = {
|
||||
type NavTabProps = {
|
||||
href: string;
|
||||
};
|
||||
|
||||
const Tab: React.FC<TabProps> = ({ href, children }) => (
|
||||
const NavTab: React.FC<NavTabProps> = ({ href, children }) => (
|
||||
<NavLink
|
||||
className="text-gray-500 border-transparent hover:text-link-blue text-sm font-bold px-3 py-3 border-b-2"
|
||||
activeClassName="text-link-blue border-link-blue"
|
||||
|
@ -17,4 +17,4 @@ const Tab: React.FC<TabProps> = ({ href, children }) => (
|
|||
</NavLink>
|
||||
);
|
||||
|
||||
export default Tab;
|
||||
export default NavTab;
|
Loading…
Reference in New Issue