import React, { FunctionComponent } from "react";
import { Project } from "../models/project";
import { getTimeUnit } from "../models/params";

export interface ProjectTimeUnitProps {
    project: Project
}

const ProjectTimeUnit: FunctionComponent<ProjectTimeUnitProps> = ({ project }) => {
    const timeUnit = getTimeUnit(project);
    return (
       <abbr title={timeUnit.label}>{timeUnit.acronym}</abbr>
    );
};

export default ProjectTimeUnit;
