openreplay/frontend/app/components/Session/Layout/Player/PlayerTime.js
2021-05-01 15:12:01 +05:30

14 lines
330 B
JavaScript

import { observer } from 'mobx-react-lite';
import { Duration } from 'luxon';
import styles from './playerTime.css';
function PlayerTime({ player, timeKey }) {
return (
<div className={ styles.time }>
{ Duration.fromMillis(player.state[timeKey]).toFormat('m:ss') }
</div>
);
}
export default observer(PlayerTime);