-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance(apps/frontend-manage): add links from and to learning analyti…
…cs pages behind feature flag (#4408)
- Loading branch information
1 parent
2041e65
commit c8e79fc
Showing
31 changed files
with
284 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
apps/frontend-manage/src/components/courses/actions/ActivityAnalyticsLink.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { faChartPie } from '@fortawesome/free-solid-svg-icons' | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' | ||
import { useTranslations } from 'next-intl' | ||
import Link from 'next/link' | ||
|
||
interface ActivityAnalyticsLinkProps { | ||
courseId: string | ||
activityId: string | ||
} | ||
|
||
function ActivityAnalyticsLink({ | ||
courseId, | ||
activityId, | ||
}: ActivityAnalyticsLinkProps) { | ||
const t = useTranslations() | ||
|
||
return ( | ||
<Link | ||
href={`/analytics/${courseId}/quizzes/${activityId}`} | ||
target="_blank" | ||
className="text-primary-100 flex flex-row items-center gap-1" | ||
data-cy={`open-analytics-async-activity`} | ||
> | ||
<FontAwesomeIcon icon={faChartPie} size="sm" className="w-4" /> | ||
<div>{t('manage.courseList.activityAnalytics')}</div> | ||
</Link> | ||
) | ||
} | ||
|
||
export default ActivityAnalyticsLink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.