openreplay/frontend/app/components/Session_/Player/Controls/Time.js
2023-01-13 17:36:35 +01:00

15 lines
464 B
JavaScript

import React from 'react';
import { PlayerContext } from 'App/components/Session/playerContext';
import { observer } from 'mobx-react-lite';
import { PlayTime } from 'App/player-ui'
const ReduxTime = observer(({ format, name, isCustom }) => {
const { store } = React.useContext(PlayerContext)
const time = store.get()[name]
return <PlayTime format={format} time={time} isCustom={isCustom} />
})
ReduxTime.displayName = "ReduxTime";
export { ReduxTime };