forked from openedx/frontend-app-learning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
28 lines (23 loc) · 807 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import React from 'react';
import { PluginSlot } from '@openedx/frontend-plugin-framework';
import { useModel } from '@src/generic/model-store';
import SidebarTriggers from '../../courseware/course/sidebar/SidebarTriggers';
import NewSidebarTriggers from '../../courseware/course/new-sidebar/SidebarTriggers';
interface Props {
courseId: string;
}
export const NotificationsDiscussionsSidebarTriggerSlot : React.FC<Props> = ({ courseId }) => {
const {
isNewDiscussionSidebarViewEnabled,
} = useModel('courseHomeMeta', courseId);
return (
<PluginSlot
id="notifications_discussions_sidebar_trigger_slot"
slotOptions={{
mergeProps: true,
}}
>
{isNewDiscussionSidebarViewEnabled ? <NewSidebarTriggers /> : <SidebarTriggers /> }
</PluginSlot>
);
};