mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* move nav icons to separate directory * remove unnecessary "slim" suffix from some icon names * fix screenshots
29 lines
652 B
TypeScript
29 lines
652 B
TypeScript
import { chakra } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import { route } from 'nextjs-routes';
|
|
|
|
import config from 'configs/app';
|
|
|
|
import * as BlockEntity from './BlockEntity';
|
|
|
|
const rollupFeature = config.features.rollup;
|
|
|
|
const BatchEntityL2 = (props: BlockEntity.EntityProps) => {
|
|
if (!rollupFeature.isEnabled) {
|
|
return null;
|
|
}
|
|
|
|
const defaultHref = route({ pathname: '/batches/[number]', query: { number: props.number.toString() } });
|
|
|
|
return (
|
|
<BlockEntity.default
|
|
{ ...props }
|
|
href={ props.href ?? defaultHref }
|
|
icon={{ name: 'txn_batches' }}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default chakra(BatchEntityL2);
|