Fix contract tab

This commit is contained in:
Willian Mitsuda 2021-11-26 03:38:24 -03:00
parent 3bfe0d0055
commit 83ce3ab734
3 changed files with 9 additions and 7 deletions

View File

@ -126,7 +126,13 @@ const AddressTransactions: React.FC = () => {
<Tab.Panels> <Tab.Panels>
<Routes> <Routes>
<Route <Route
path="*" index
element={
<AddressTransactionResults address={checksummedAddress} />
}
/>
<Route
path="txs/:direction"
element={ element={
<AddressTransactionResults address={checksummedAddress} /> <AddressTransactionResults address={checksummedAddress} />
} }

View File

@ -60,11 +60,7 @@ const App = () => {
/> />
<Route path="tx/:txhash/*" element={<Transaction />} /> <Route path="tx/:txhash/*" element={<Transaction />} />
<Route <Route
path="address/:addressOrName" path="address/:addressOrName/*"
element={<AddressTransactions />}
/>
<Route
path="address/:addressOrName/:direction"
element={<AddressTransactions />} element={<AddressTransactions />}
/> />
<Route path="*" element={<Home />} /> <Route path="*" element={<Home />} />

View File

@ -26,7 +26,7 @@ const UndefinedPageButton: React.FC<UndefinedPageButtonProps> = ({
return ( return (
<NavLink <NavLink
className="transition-colors bg-link-blue bg-opacity-10 text-link-blue hover:bg-opacity-100 hover:text-white disabled:bg-link-blue disabled:text-gray-400 disabled:cursor-default rounded-lg px-3 py-2 text-xs" className="transition-colors bg-link-blue bg-opacity-10 text-link-blue hover:bg-opacity-100 hover:text-white disabled:bg-link-blue disabled:text-gray-400 disabled:cursor-default rounded-lg px-3 py-2 text-xs"
to={`/address/${address}/${direction}${ to={`/address/${address}/txs/${direction}${
direction === "prev" || direction === "next" ? `?h=${hash}` : "" direction === "prev" || direction === "next" ? `?h=${hash}` : ""
}`} }`}
> >