FC removal

This commit is contained in:
proddy
2024-08-08 12:57:04 +02:00
parent 3481a879c2
commit 5355c65da8
6 changed files with 12 additions and 37 deletions

View File

@@ -1,4 +1,3 @@
import type { FC } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { ListItemButton, ListItemIcon, ListItemText } from '@mui/material';
@@ -13,12 +12,12 @@ interface LayoutMenuItemProps {
disabled?: boolean;
}
const LayoutMenuItem: FC<LayoutMenuItemProps> = ({
const LayoutMenuItem = ({
icon: Icon,
label,
to,
disabled
}) => {
}: LayoutMenuItemProps) => {
const { pathname } = useLocation();
const selected = routeMatches(to, pathname);

View File

@@ -1,4 +1,3 @@
import type { FC } from 'react';
import { Link } from 'react-router-dom';
import NavigateNextIcon from '@mui/icons-material/NavigateNext';
@@ -34,14 +33,14 @@ function RenderIcon({ icon: Icon, bgcolor, label, text }: ListMenuItemProps) {
);
}
const LayoutMenuItem: FC<ListMenuItemProps> = ({
const LayoutMenuItem = ({
icon,
bgcolor,
label,
text,
to,
disabled
}) => (
}: ListMenuItemProps) => (
<>
{to && !disabled ? (
<ListItem