You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
659 B
30 lines
659 B
import React, { useMemo } from 'react';
|
|
import Label from 'Components/Label';
|
|
import { kinds } from 'Helpers/Props';
|
|
import getFinaleTypeName from './getFinaleTypeName';
|
|
import styles from './FinaleType.css';
|
|
|
|
interface SeriesStatusCellProps {
|
|
finaleType: string;
|
|
}
|
|
|
|
function FinaleType(props: SeriesStatusCellProps) {
|
|
const { finaleType } = props;
|
|
|
|
const finaleText = useMemo(() => {
|
|
return getFinaleTypeName(finaleType);
|
|
}, [finaleType]);
|
|
|
|
if (finaleType == null || finaleText == null) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Label className={styles.label} kind={kinds.INFO}>
|
|
{finaleText}
|
|
</Label>
|
|
);
|
|
}
|
|
|
|
export default FinaleType;
|