Files
jitsi-meet/react/features/speaker-stats/components/web/TimeElapsed.tsx
Gabriel Borlea 4b969cf4ab feat(face-landmarks): add face landmarks timeline (#12561)
* feat(face-landmarks): add face landmarks timeline

fixes after rebase

* fixes after rebase compiling and linting

* fix: change keyboard shorcut for participants stats

* fix: label for emotions switch

* fix: linting issues

* code review changes

* fix linting issues

* code review changes 2

* fix typo
2022-11-22 15:56:37 +02:00

37 lines
820 B
TypeScript

import React from 'react';
import { useTranslation } from 'react-i18next';
import { createLocalizedTime } from '../timeFunctions';
/**
* The type of the React {@code Component} props of {@link TimeElapsed}.
*/
type Props = {
/**
* The milliseconds to be converted into a human-readable format.
*/
time: number;
};
/**
* React component for displaying total time elapsed. Converts a total count of
* milliseconds into a more humanized form: "# hours, # minutes, # seconds".
* With a time of 0, "0s" will be displayed.
*
* @augments Component
*/
const TimeElapsed = ({ time }: Props) => {
const { t } = useTranslation();
const timeElapsed = createLocalizedTime(time, t);
return (
<span>
{ timeElapsed }
</span>
);
};
export default TimeElapsed;