import React from 'react'; import * as Flex from '@twilio/flex-ui'; import { FlexPlugin } from 'flex-plugin'; import CustomTaskListContainer from './components/CustomTaskList/CustomTaskList.Container'; import reducers, { namespace } from './states'; const PLUGIN_NAME = '{{pluginClassName}}'; export default class {{pluginClassName}} extends FlexPlugin { constructor() { super(PLUGIN_NAME); } /** * This code is run when your plugin is being started * Use this to modify any UI components or attach to the actions framework * * @param flex { typeof Flex } * @param manager { Flex.Manager } */ async init(flex: typeof Flex, manager: Flex.Manager): Promise { this.registerReducers(manager); const options: Flex.ContentFragmentProps = { sortOrder: -1 }; flex.AgentDesktopView.Panel1.Content.add(, options); } /** * Registers the plugin reducers * * @param manager { Flex.Manager } */ private registerReducers(manager: Flex.Manager) { if (!manager.store.addReducer) { // eslint-disable-next-line console.error(`You need FlexUI > 1.9.0 to use built-in redux; you are currently on ${Flex.VERSION}`); return; } manager.store.addReducer(namespace, reducers); } }