Skip to content

Commit

Permalink
fix: change standard hyperlinks to react-router Link on video detail …
Browse files Browse the repository at this point in the history
…page (#1164)
  • Loading branch information
jajjibhai008 authored Aug 22, 2024
1 parent 94a1676 commit 196fdb5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/components/microlearning/VideoDetailPage.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable max-len */
import React, { useEffect } from 'react';
import { useEffect } from 'react';
import {
Container, Row, Badge, Skeleton,
Hyperlink,
Icon,
Button,
} from '@openedx/paragon';
Expand All @@ -11,6 +10,7 @@ import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
import {
Person, Speed, Timelapse,
} from '@openedx/paragon/icons';
import { Link } from 'react-router-dom';
import {
useVideoDetails, useEnterpriseCustomer, useVideoCourseMetadata,
useSubscriptions,
Expand Down Expand Up @@ -144,11 +144,11 @@ const VideoDetailPage = () => {
className="mr-2 logo-cutom-style rounded-sm p-1"
/>
<div className="x-small">
<Hyperlink
destination={`/${enterpriseCustomer.slug}/course/${courseMetadata?.key}`}
<Link
to={`/${enterpriseCustomer.slug}/course/${courseMetadata?.key}`}
>
{courseMetadata?.title}
</Hyperlink>
</Link>
</div>
</div>
<VideoCourseReview courseKey={courseMetadata.key} />
Expand Down Expand Up @@ -231,20 +231,20 @@ const VideoDetailPage = () => {
values={{
// eslint-disable-next-line react/no-unstable-nested-components
a: (chunks) => (
<Hyperlink
destination={`/${enterpriseCustomer.slug}/course/${courseMetadata?.key}`}
<Link
to={`/${enterpriseCustomer.slug}/course/${courseMetadata?.key}`}
>
{chunks}
</Hyperlink>
</Link>
),
}}
/>
</div>
<div>
<Button
variant="primary"
as={Hyperlink}
destination={`/${enterpriseCustomer.slug}/course/${courseMetadata?.key}`}
as={Link}
to={`/${enterpriseCustomer.slug}/course/${courseMetadata?.key}`}
className="mt-4.5 w-100"
>
<FormattedMessage
Expand Down

0 comments on commit 196fdb5

Please sign in to comment.