import { Data } from '../../../../../types/data';
import { formatSecondsToTimestamp } from '../../../../Utils/Transformers/Timestamp';

export const TimestampRenderer = <T extends Data>(
  val: unknown,
  _data: T,
): string => {
  if (val) {
    return formatSecondsToTimestamp(val as number) as string;
  }

  return '';
};
