2021-10-16 03:07:13 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import Service from '/imports/ui/components/captions/service';
|
|
|
|
import CaptionButton from './component';
|
|
|
|
|
|
|
|
const Container = (props) => <CaptionButton {...props} />;
|
|
|
|
|
2023-03-24 21:07:56 +08:00
|
|
|
export default withTracker(({ setIsOpen }) => ({
|
2021-10-16 03:07:13 +08:00
|
|
|
isActive: Service.isCaptionsActive(),
|
|
|
|
handleOnClick: () => (Service.isCaptionsActive()
|
|
|
|
? Service.deactivateCaptions()
|
2023-03-24 21:07:56 +08:00
|
|
|
: setIsOpen(true)),
|
|
|
|
}))(Container);
|