import { Box, Flex } from '@chakra-ui/react';
import React from 'react';
import { Tooltip } from 'toolkit/chakra/tooltip';
import * as EntityBase from 'ui/shared/entities/base/components';
import type { ContentProps } from './AddressEntity';
import AddressEntity from './AddressEntity';
const AddressEntityContentProxy = (props: ContentProps) => {
const implementations = props.address.implementations;
if (!implementations || implementations.length === 0) {
return null;
}
const colNum = Math.min(implementations.length, 3);
const nameTag = props.address.metadata?.tags.find(tag => tag.tagType === 'name')?.name;
const implementationName = implementations.length === 1 && implementations[0].name ? implementations[0].name : undefined;
const content = (
<>
Proxy contract
{ props.address.name ? ` (${ props.address.name })` : '' }
Implementation{ implementations.length > 1 ? 's' : '' }
{ implementationName ? ` (${ implementationName })` : '' }
{ implementations.map((item) => (
)) }
>
);
return (
);
};
export default React.memo(AddressEntityContentProxy);