Move destructuring of the props into function SidebarSubmenuItem

Signed-off-by: hiba-aldalaty <hibaaldalaty@gmail.com>
This commit is contained in:
hiba-aldalaty
2021-11-24 11:16:53 +00:00
parent 9f8e9a04d1
commit 34706291e7
2 changed files with 5 additions and 12 deletions
+3 -6
View File
@@ -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);