Skip to content

Commit

Permalink
Use the <Link /> provided by gatsby-plugin-react-i18next
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfacq committed Sep 13, 2023
1 parent 730c78c commit 83044b4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/RandomContributor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React, { MutableRefObject, useRef } from 'react';
import { useAdoptiumContributorsApi, useOnScreen } from '../../hooks';
import './RandomContributor.scss';
import AnimatedPlaceholder from '../AnimatedPlaceholder';
import { Trans } from 'gatsby-plugin-react-i18next';
import Link from '@mui/material/Link';
import { Trans, Link } from 'gatsby-plugin-react-i18next';

const RandomContributor = (): JSX.Element => {
const ref = useRef<HTMLDivElement | null>(null);
Expand Down Expand Up @@ -32,9 +31,9 @@ const RandomContributor = (): JSX.Element => {
i18nKey="asciidoc.random.contributor.text"
defaults='Thank you <profileUri>{{login}}</profileUri> for making <commitsListUri>{{contributionsCount}} contribution(s)</commitsListUri> to <repoUri>{{repo}}</repoUri>'
components={{
profileUri: <Link href={contributor.profileUri} target="_blank" rel="nofollow noopener noreferrer" />,
commitsListUri: <Link href={contributor.commitsListUri} target="_blank" rel="nofollow noopener noreferrer"/>,
repoUri: <Link href={`https://github.com/adoptium/${contributor.repo}`} target="_blank" rel="nofollow noopener noreferrer"/>,
profileUri: <Link to={contributor.profileUri} target="_blank" rel="nofollow noopener noreferrer" />,
commitsListUri: <Link to={contributor.commitsListUri} target="_blank" rel="nofollow noopener noreferrer"/>,
repoUri: <Link to={`https://github.com/adoptium/${contributor.repo}`} target="_blank" rel="nofollow noopener noreferrer"/>,
}}
values={{
'login': contributor.login,
Expand Down

0 comments on commit 83044b4

Please sign in to comment.