openreplay/frontend/app/components/Session_/Player/Controls/Time.js
2023-03-28 16:02:12 +02:00

15 lines
469 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] || 0
return <PlayTime format={format} time={time} isCustom={isCustom} />
})
ReduxTime.displayName = "ReduxTime";
export { ReduxTime };