Move destructuring of the props into function SidebarSubmenuItem
Signed-off-by: hiba-aldalaty <hibaaldalaty@gmail.com>
This commit is contained in:
@@ -1994,12 +1994,9 @@ export const SidebarSubmenu: ({
|
||||
}: PropsWithChildren<SidebarSubmenuProps>) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export const SidebarSubmenuItem: ({
|
||||
title,
|
||||
to,
|
||||
icon: Icon,
|
||||
dropdownItems,
|
||||
}: SidebarSubmenuItemProps) => JSX.Element;
|
||||
export const SidebarSubmenuItem: (
|
||||
props: SidebarSubmenuItemProps,
|
||||
) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export type SidebarSubmenuItemProps = {
|
||||
|
||||
@@ -113,12 +113,8 @@ export type SidebarSubmenuItemProps = {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const SidebarSubmenuItem = ({
|
||||
title,
|
||||
to,
|
||||
icon: Icon,
|
||||
dropdownItems,
|
||||
}: SidebarSubmenuItemProps) => {
|
||||
export const SidebarSubmenuItem = (props: SidebarSubmenuItemProps) => {
|
||||
const { title, to, icon: Icon, dropdownItems } = props;
|
||||
const classes = useStyles();
|
||||
const { pathname: locationPathname } = useLocation();
|
||||
const { pathname: toPathname } = useResolvedPath(to);
|
||||
|
||||
Reference in New Issue
Block a user