import React from 'react';
import {useTranslation} from 'react-i18next';
import {Pill} from '@components';

function PointPill({points}: {points: number}) {
  const {t} = useTranslation();
  return (
    <Pill
      text={`${points > 0 ? `+${points}` : points} ${t(
        'acknowledgements.point',
        {count: Math.abs(points)},
      ).toLowerCase()}`}
    />
  );
}

export default PointPill;
