2021-05-18 04:25:07 +08:00
|
|
|
import React, { useContext } from 'react';
|
2019-05-17 04:11:10 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import { withModalMounter } from '/imports/ui/components/modal/service';
|
|
|
|
import CaptionsService from '/imports/ui/components/captions/service';
|
|
|
|
import WriterMenu from './component';
|
2021-05-18 04:25:07 +08:00
|
|
|
import { NLayoutContext } from '../../layout/context/context';
|
2019-05-17 04:11:10 +08:00
|
|
|
|
2021-05-18 04:25:07 +08:00
|
|
|
const WriterMenuContainer = (props) => {
|
|
|
|
const newLayoutContext = useContext(NLayoutContext);
|
|
|
|
const { newLayoutContextDispatch } = newLayoutContext;
|
|
|
|
return <WriterMenu {...{ newLayoutContextDispatch, ...props }} />;
|
|
|
|
};
|
2019-05-17 04:11:10 +08:00
|
|
|
|
|
|
|
export default withModalMounter(withTracker(({ mountModal }) => ({
|
|
|
|
closeModal: () => mountModal(null),
|
2021-01-30 00:17:35 +08:00
|
|
|
allLocales: CaptionsService.getAvailableLocales(),
|
2019-05-17 04:11:10 +08:00
|
|
|
takeOwnership: locale => CaptionsService.takeOwnership(locale),
|
|
|
|
}))(WriterMenuContainer));
|