openreplay/frontend/app/components/Session_/Player/Controls/Time.js
2021-05-01 15:12:01 +05:30

21 lines
No EOL
434 B
JavaScript

import { Duration } from 'luxon';
import { connectPlayer } from 'Player';
import styles from './time.css';
const Time = ({ time }) => (
<div className={ styles.time }>
{ Duration.fromMillis(time).toFormat('m:ss') }
</div>
)
Time.displayName = "Time";
const ReduxTime = connectPlayer((state, { name }) => ({
time: state[ name ],
}))(Time);
ReduxTime.displayName = "ReduxTime";
export default Time;
export { ReduxTime };