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