-
Notifications
You must be signed in to change notification settings - Fork 322
Expand file tree
/
Copy pathindex.tsx
More file actions
37 lines (34 loc) · 999 Bytes
/
index.tsx
File metadata and controls
37 lines (34 loc) · 999 Bytes
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
29
30
31
32
33
34
35
36
37
import { Button } from '@openedx/paragon';
import { getConfig } from '@edx/frontend-platform';
import { PluginSlot } from '@openedx/frontend-plugin-framework';
import { useIntl } from '@edx/frontend-platform/i18n';
import messages from '../../../courseware/course/course-exit/messages';
interface Props {
href: string
}
const ViewCoursesLink: React.FC<Props> = ({ href }: Props) => {
const intl = useIntl();
return (
<div className="row w-100 mt-2 mb-4 justify-content-end">
<Button
variant="outline-primary"
href={href}
>
{intl.formatMessage(messages.viewCoursesButton)}
</Button>
</div>
);
};
export const CourseExitViewCoursesPluginSlot: React.FC = () => {
const href = `${getConfig().LMS_BASE_URL}/dashboard`;
return (
<PluginSlot
id="org.openedx.frontend.learning.course_exit_view_courses.v1"
slotOptions={{
mergeProps: true,
}}
>
<ViewCoursesLink href={href} />
</PluginSlot>
);
};