import classNames from 'classnames' import React from 'react' import DoubleLogo from 'components/common/DoubleLogo' import Text from 'components/common/Text' import TitleAndSubCell from 'components/common/TitleAndSubCell' import { VaultStatus } from 'types/enums/vault' import { produceCountdown } from 'utils/formatters' export const NAME_META = { id: 'name', header: 'Vault', accessorKey: 'name' } interface Props { vault: Vault | DepositedVault } export default function Name(props: Props) { const { vault } = props const timeframe = vault.lockup.timeframe[0] const unlockDuration = !!timeframe ? ` - (${vault.lockup.duration}${timeframe})` : '' let remainingTime = 0 let status: VaultStatus = VaultStatus.ACTIVE if ('status' in vault) { status = vault.status as VaultStatus if (vault.status === VaultStatus.UNLOCKING && vault.unlocksAt) { remainingTime = vault.unlocksAt - Date.now() } } return (