Skip to content

Commit

Permalink
replace anchor with router link to prevent page reload on click
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasm0 committed Dec 24, 2024
1 parent 8233efd commit a1c67c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SourceControlIcon from '@site/static/img/source-control.svg';
import TestingIcon from '@site/static/img/testing.svg';
import ThirdPartyIcon from '@site/static/img/third_party.svg';
import W3CIcon from '@site/static/img/W3C.svg';
import Link from '@docusaurus/Link';

interface FeatureItem {
title: string;
Expand Down Expand Up @@ -100,7 +101,9 @@ export default function HomepageFeatures(): JSX.Element {
listItem.title === 'Using Git' ? 'dark-mode-github-icon' : 'ams-card__image',
})}
<Heading size="level-4">
<Card.Link href={listItem.to}>{listItem.title}</Card.Link>
<Link to={listItem.to} className="ams-card__link">
{listItem.title}
</Link>
</Heading>
<Paragraph size="small">{listItem.description}</Paragraph>
</Card>
Expand Down

0 comments on commit a1c67c1

Please sign in to comment.