diff --git a/apps/fe/src/components/themed-layout/index.tsx b/apps/fe/src/components/themed-layout/index.tsx index f05d09b..f42ffe7 100644 --- a/apps/fe/src/components/themed-layout/index.tsx +++ b/apps/fe/src/components/themed-layout/index.tsx @@ -1,6 +1,6 @@ 'use client'; -import { PropsWithChildren, useContext } from 'react'; +import { Fragment, PropsWithChildren, useContext } from 'react'; import Image from 'next/image'; import Link from 'next/link'; import { Layout, Typography } from 'antd'; @@ -34,12 +34,12 @@ function CustomSider({ mode, user }: { mode: string; user: UserDto }) { render={({ items, logout, collapsed }) => { return ( <> - {items.map((item) => { + {items.map((item, index) => { if (item.key.includes('admin') && user?.role !== UserRoleEnum.Admin) { - return <>; + return ; } - return item; + return {item}; })} {logout} {collapsed} @@ -75,17 +75,8 @@ export function ThemedLayout({ children }: PropsWithChildren) { return (
} - Sider={() => ( - <> - - - )} - dashboard - Footer={() => ( - <> - - - )} + Sider={() => } + Footer={() => } > {children}