forked from openedx/frontend-app-learner-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExploreProgramsCTA.tsx
More file actions
30 lines (27 loc) · 873 Bytes
/
ExploreProgramsCTA.tsx
File metadata and controls
30 lines (27 loc) · 873 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
import React from 'react';
import { getConfig } from '@edx/frontend-platform';
import { useIntl } from '@edx/frontend-platform/i18n';
import { Card, Button } from '@openedx/paragon';
import { Search } from '@openedx/paragon/icons';
import messages from './messages';
const ExploreProgramsCTA: React.FC = () => {
const { formatMessage } = useIntl();
const href = getConfig().EXPLORE_PROGRAMS_URL || `${getConfig().LMS_BASE_URL}/courses`;
return (
<Card>
<Card.Section>
{formatMessage(messages.exploreCoursesCTAText)}
</Card.Section>
<Card.Footer className="justify-content-center">
<Button
as="a"
href={href}
iconBefore={Search}
>
{formatMessage(messages.exploreCoursesCTAButtonText)}
</Button>
</Card.Footer>
</Card>
);
};
export default ExploreProgramsCTA;