import dayjs from 'dayjs'
import { TimestampInfo } from 'ui-patterns/TimestampInfo'
import { TableCell } from 'ui/src/components/shadcn/ui/table'
interface TokenNameCellProps {
name: string
tokenAlias: string
}
export const TokenNameCell = ({ name, tokenAlias }: TokenNameCellProps) => (
{name}
{tokenAlias}
)
interface LastUsedCellProps {
lastUsedAt: string | null | undefined
}
export const LastUsedCell = ({ lastUsedAt }: LastUsedCellProps) => (
{lastUsedAt ? (
) : (
Never used
)}
)
interface ExpiresCellProps {
expiresAt: string | null | undefined
}
export const ExpiresCell = ({ expiresAt }: ExpiresCellProps) => (
{expiresAt ? (
dayjs(expiresAt).isBefore(dayjs()) ? (
) : (
)
) : (
Never
)}
)