Skip to content

Commit

Permalink
different solution
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 27, 2021
1 parent 6fbb847 commit a030c46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/src/pages/components/breadcrumbs/RouterBreadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ const breadcrumbNameMap = {
};

function ListItemLink(props) {
const { to, open } = props;
const { to, open, ...other } = props;
const primary = breadcrumbNameMap[to];

return (
<li>
<ListItem button component={RouterLink} to={to}>
<ListItem button component={RouterLink} to={to} {...other}>
<ListItemText primary={primary} />
{open != null ? open ? <ExpandLess /> : <ExpandMore /> : null}
</ListItem>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/components/breadcrumbs/RouterBreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ const breadcrumbNameMap: { [key: string]: string } = {
};

function ListItemLink(props: ListItemLinkProps) {
const { to, open } = props;
const { to, open, ...other } = props;
const primary = breadcrumbNameMap[to];

return (
<li>
<ListItem button component={RouterLink} to={to}>
<ListItem button component={RouterLink as any} to={to} {...other}>
<ListItemText primary={primary} />
{open != null ? open ? <ExpandLess /> : <ExpandMore /> : null}
</ListItem>
Expand Down

0 comments on commit a030c46

Please sign in to comment.