mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* add prefix to API resources * fix pw tests * refactor config * remove unnecessary prefixes in resource names * fixes * update screenshots
18 lines
605 B
TypeScript
18 lines
605 B
TypeScript
import { useRouter } from 'next/router';
|
|
|
|
import useApiQuery from 'lib/api/useApiQuery';
|
|
import getQueryParamString from 'lib/router/getQueryParamString';
|
|
|
|
import useContractTabs from '../useContractTabs';
|
|
|
|
const ContractDetails = () => {
|
|
const router = useRouter();
|
|
const hash = getQueryParamString(router.query.hash);
|
|
const addressQuery = useApiQuery('general:address', { pathParams: { hash } });
|
|
const { tabs } = useContractTabs(addressQuery.data, false);
|
|
const content = tabs.find(({ id }) => id === 'contract_code')?.component;
|
|
return content ?? null;
|
|
};
|
|
|
|
export default ContractDetails;
|