Skip to content

Commit

Permalink
Remove explicitly setting role undefined in ListRouter demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed Aug 12, 2024
1 parent 0e55ea4 commit e4406bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
12 changes: 1 addition & 11 deletions docs/data/material/integrations/routing/ListRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ import Divider from '@mui/material/Divider';
import InboxIcon from '@mui/icons-material/Inbox';
import DraftsIcon from '@mui/icons-material/Drafts';
import Typography from '@mui/material/Typography';
import {
Link as RouterLink,
Route,
Routes,
MemoryRouter,
useLocation,
} from 'react-router-dom';
import { Link, Route, Routes, MemoryRouter, useLocation } from 'react-router-dom';
import { StaticRouter } from 'react-router-dom/server';

function Router(props) {
Expand All @@ -37,10 +31,6 @@ Router.propTypes = {
children: PropTypes.node,
};

const Link = React.forwardRef(function Link(itemProps, ref) {
return <RouterLink ref={ref} {...itemProps} role={undefined} />;
});

function ListItemLink(props) {
const { icon, primary, to } = props;

Expand Down
15 changes: 1 addition & 14 deletions docs/data/material/integrations/routing/ListRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ import Divider from '@mui/material/Divider';
import InboxIcon from '@mui/icons-material/Inbox';
import DraftsIcon from '@mui/icons-material/Drafts';
import Typography from '@mui/material/Typography';
import {
Link as RouterLink,
LinkProps as RouterLinkProps,
Route,
Routes,
MemoryRouter,
useLocation,
} from 'react-router-dom';
import { Link, Route, Routes, MemoryRouter, useLocation } from 'react-router-dom';
import { StaticRouter } from 'react-router-dom/server';

function Router(props: { children?: React.ReactNode }) {
Expand All @@ -39,12 +32,6 @@ interface ListItemLinkProps {
to: string;
}

const Link = React.forwardRef<HTMLAnchorElement, RouterLinkProps>(
function Link(itemProps, ref) {
return <RouterLink ref={ref} {...itemProps} role={undefined} />;
},
);

function ListItemLink(props: ListItemLinkProps) {
const { icon, primary, to } = props;

Expand Down

0 comments on commit e4406bb

Please sign in to comment.