import { FC } from 'react' import { Badge, IconLoader, IconPauseCircle } from 'ui' import { Project } from 'types' import CardButton from 'components/ui/CardButton' import { PROJECT_STATUS } from 'lib/constants' interface Props { project: Project rewriteHref?: string } const ProjectCard: FC = ({ project, rewriteHref }) => { const { name, ref: projectRef } = project const desc = `${project.cloud_provider} | ${project.region}` const isPausing = project.status === PROJECT_STATUS.GOING_DOWN const isPaused = project.status === PROJECT_STATUS.INACTIVE const isRestoring = project.status === PROJECT_STATUS.RESTORING return (
  • {name} } footer={
    {desc} {isRestoring ? (
    Restoring
    ) : isPausing ? (
    Pausing
    ) : isPaused ? (
    Paused
    ) : ( <> )}
    } />
  • ) } export default ProjectCard