Files
explore/ui/multichain/home/useFetchParentChainApi.tsx
tom goriunovandGitHub 25a4c2a97e Replace OP Superchain feature with generic Multichain explorer (#3299)
* rename feature

* rename evn preset

* types, mocks and stubs renaming

* rename UI components
2026-02-25 18:02:52 +01:00

17 lines
556 B
TypeScript

import React from 'react';
import useFetch from 'lib/hooks/useFetch';
interface Params {
path: string;
}
export default function useFetchParentChainApi() {
const fetch = useFetch();
return React.useCallback(({ path }: Params) => {
// For current implementation of the feature we agreed to use the Ethereum mainnet stats data to show it on the homepage
// It is very likely this will change once we identify the potential future for the Multichain explorer
return fetch(`https://eth.blockscout.com/api/v2${ path }`);
}, [ fetch ]);
}