Skip to content

Commit

Permalink
fix: removereact-reouter-dom on the link element (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Dec 12, 2024
1 parent b915f8f commit 9d1b1bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 1 addition & 8 deletions src/Card/LinkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {
useTheme,
} from '@mui/material';

import { Link } from 'react-router-dom';

import { ItemType } from '@graasp/sdk';

import CardThumbnail from './components/CardThumbnail.js';
Expand Down Expand Up @@ -50,12 +48,7 @@ const FancyLink = ({
}}
data-testid={FANCY_LINK_CARD_TEST_ID}
>
<CardActionArea
component={Link}
to={url}
sx={{ height: '100%' }}
onClick={onClick}
>
<CardActionArea href={url} sx={{ height: '100%' }} onClick={onClick}>
<Stack direction='row' alignItems='center' height='100%' minWidth={0}>
<CardThumbnail
thumbnail={thumbnail}
Expand Down
3 changes: 1 addition & 2 deletions src/items/LinkItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Alert, Box, Link as MUILink, styled } from '@mui/material';

import { Fragment, memo, useEffect, useState } from 'react';
import { Link } from 'react-router-dom';

import { LinkItemType, getLinkExtra } from '@graasp/sdk';

Expand Down Expand Up @@ -234,7 +233,7 @@ const LinkItem = ({
}

return (
<MUILink component={Link} to={url} onClick={onClick}>
<MUILink href={url} onClick={onClick}>
{url}
</MUILink>
);
Expand Down

0 comments on commit 9d1b1bc

Please sign in to comment.