Skip to content

Commit

Permalink
fixes missing Link item in MenuLink
Browse files Browse the repository at this point in the history
  • Loading branch information
matmair committed Jul 19, 2023
1 parent ea7c612 commit a25cd60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/frontend/src/components/items/MenuLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SimpleGrid, Text, UnstyledButton } from '@mantine/core';
import { Anchor, SimpleGrid, Text, UnstyledButton } from '@mantine/core';
import React from 'react';
import { Link } from 'react-router-dom';

import { InvenTreeStyle } from '../../globalStyle';
import { DocTooltip } from './DocTooltip';
Expand Down Expand Up @@ -54,8 +55,13 @@ export function MenuLinks({
return (
<SimpleGrid cols={2} spacing={0}>
{filteredLinks.map((item) => (
<ConditionalDocTooltip item={item}>
<UnstyledButton className={classes.subLink} key={item.id}>
<ConditionalDocTooltip item={item} key={item.id}>
<UnstyledButton
className={classes.subLink}
component={Link}
to={item.link}
p={0}
>
<Text size="sm" fw={500}>
{item.text}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/defaults/menuItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const menuItems: MenuLinkItem[] = [
{
id: 'profile',
text: <Trans>Profile page</Trans>,
link: '/profile/',
link: '/profile/user',
doctext: <Trans>User attributes and design settings.</Trans>
}
];

0 comments on commit a25cd60

Please sign in to comment.