mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
31 lines
707 B
TypeScript
31 lines
707 B
TypeScript
import { chakra } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import { route } from 'nextjs-routes';
|
|
|
|
import config from 'configs/app';
|
|
|
|
import * as AddressEntity from './AddressEntity';
|
|
|
|
const rollupFeature = config.features.rollup;
|
|
|
|
const AddressEntityL1 = (props: AddressEntity.EntityProps) => {
|
|
if (!rollupFeature.isEnabled) {
|
|
return null;
|
|
}
|
|
|
|
const defaultHref = rollupFeature.parentChain.baseUrl + route({
|
|
pathname: '/address/[hash]',
|
|
query: {
|
|
...props.query,
|
|
hash: props.address.hash,
|
|
},
|
|
});
|
|
|
|
return (
|
|
<AddressEntity.default { ...props } href={ props.href ?? defaultHref } link={{ external: true }}/>
|
|
);
|
|
};
|
|
|
|
export default chakra(AddressEntityL1);
|