openreplay/frontend/app/components/Session_/Player/Controls/Time.js
Shekar Siri 2ed5cac986
Webpack upgrade and dependency cleanup (#523)
* change(ui) - webpack update
* change(ui) - api optimize and other fixes
2022-06-03 16:47:38 +02:00

22 lines
No EOL
468 B
JavaScript

import React from 'react';
import { Duration } from 'luxon';
import { connectPlayer } from 'Player';
import styles from './time.module.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 };