openreplay/frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx
Delirium 96453e96e5
feat ui: change in player controls, move ai summary button, refactor old code etc (#1978)
* feat(ui): rework for player look

* remove unused code

* move summary button and block inside xray

* move class

* fixup mobile controls panel

* change notes, change xray feat selection
2024-03-21 10:40:36 +01:00

15 lines
456 B
TypeScript

import React from 'react';
import { PlayerContext } from 'App/components/Session/playerContext';
import { observer } from 'mobx-react-lite';
import { Switch } from 'antd'
function AutoplayToggle() {
const { player, store } = React.useContext(PlayerContext)
const { autoplay } = store.get()
return (
<Switch onChange={() => player.toggleAutoplay()} checked={autoplay} checkedChildren="Auto" />
);
}
export default observer(AutoplayToggle);