Rename, since the /:addressorName now may not route to just address search results

This commit is contained in:
Willian Mitsuda 2022-01-24 16:18:28 -03:00
parent 80ef1cf820
commit af15aaba0c
2 changed files with 5 additions and 7 deletions

View File

@ -25,7 +25,7 @@ import { useMultipleMetadata } from "./sourcify/useSourcify";
import { ChecksummedAddress } from "./types"; import { ChecksummedAddress } from "./types";
import { useAddressesWithCode } from "./useErigonHooks"; import { useAddressesWithCode } from "./useErigonHooks";
const AddressTransactions: React.FC = () => { const Address: React.FC = () => {
const { provider } = useContext(RuntimeContext); const { provider } = useContext(RuntimeContext);
const { addressOrName, direction } = useParams(); const { addressOrName, direction } = useParams();
if (addressOrName === undefined) { if (addressOrName === undefined) {
@ -175,4 +175,4 @@ const AddressTransactions: React.FC = () => {
); );
}; };
export default AddressTransactions; export default Address;

View File

@ -17,11 +17,9 @@ const BlockTransactions = React.lazy(
/* webpackChunkName: "blocktxs", webpackPrefetch: true */ "./BlockTransactions" /* webpackChunkName: "blocktxs", webpackPrefetch: true */ "./BlockTransactions"
) )
); );
const AddressTransactions = React.lazy( const Address = React.lazy(
() => () =>
import( import(/* webpackChunkName: "address", webpackPrefetch: true */ "./Address")
/* webpackChunkName: "address", webpackPrefetch: true */ "./AddressTransactions"
)
); );
const Transaction = React.lazy( const Transaction = React.lazy(
() => () =>
@ -61,7 +59,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 />} element={<Address />}
/> />
<Route path="*" element={<Home />} /> <Route path="*" element={<Home />} />
</Route> </Route>