refactor: 개발자도구 콘솔 에러 fix

main
minuk926 3 years ago
parent 16839b1f46
commit a7da041904

@ -7,7 +7,6 @@ import { Typography } from '@mui/material';
import NavGroup from './NavGroup'; import NavGroup from './NavGroup';
import useAuth from 'hooks/useAuth'; import useAuth from 'hooks/useAuth';
import other from 'menu-items/other';
import admin from 'menu-items/admin'; import admin from 'menu-items/admin';
import judge from 'menu-items/judge'; import judge from 'menu-items/judge';
import dashboard from 'menu-items/dashboard'; import dashboard from 'menu-items/dashboard';
@ -17,7 +16,7 @@ import dashboard from 'menu-items/dashboard';
const MenuList = () => { const MenuList = () => {
const { accesstype } = useAuth(); const { accesstype } = useAuth();
const menuItem = accesstype === '001' ? { items: [dashboard, admin, other] } : { items: [judge] }; const menuItem = accesstype === '001' ? { items: [dashboard, admin] } : { items: [judge] };
const navItems = menuItem.items.map((item) => { const navItems = menuItem.items.map((item) => {
switch (item.type) { switch (item.type) {

@ -9,7 +9,6 @@ import { AppBar, Box, Container, CssBaseline, Toolbar, useMediaQuery } from '@mu
import Breadcrumbs from 'ui-component/extended/Breadcrumbs'; import Breadcrumbs from 'ui-component/extended/Breadcrumbs';
import Header from './Header'; import Header from './Header';
import Sidebar from './Sidebar'; import Sidebar from './Sidebar';
import other from 'menu-items/other';
import admin from 'menu-items/admin'; import admin from 'menu-items/admin';
import judge from 'menu-items/judge'; import judge from 'menu-items/judge';
import dashboard from 'menu-items/dashboard'; import dashboard from 'menu-items/dashboard';
@ -120,7 +119,7 @@ const MainLayout = () => {
<Container maxWidth="lg"> <Container maxWidth="lg">
<Breadcrumbs <Breadcrumbs
separator={IconChevronRight} separator={IconChevronRight}
navigation={accesstype === '001' ? { items: [dashboard, admin, other] } : { items: [judge] }} navigation={accesstype === '001' ? { items: [dashboard, admin] } : { items: [judge] }}
icon icon
title title
rightAlign rightAlign
@ -132,7 +131,7 @@ const MainLayout = () => {
<> <>
<Breadcrumbs <Breadcrumbs
separator={IconChevronRight} separator={IconChevronRight}
navigation={accesstype === '001' ? { items: [dashboard, admin, other] } : { items: [judge] }} navigation={accesstype === '001' ? { items: [dashboard, admin] } : { items: [judge] }}
icon icon
title title
rightAlign rightAlign

@ -1,55 +0,0 @@
// third-party
import { FormattedMessage } from 'react-intl';
// assets
import { IconBrandChrome, IconHelp, IconSitemap } from '@tabler/icons';
// constant
const icons = {
IconBrandChrome,
IconHelp,
IconSitemap
};
// ==============================|| SAMPLE PAGE & DOCUMENTATION MENU ITEMS ||============================== //
const other = {
id: 'sample-docs-roadmap',
type: 'group',
children: [
{
id: 'modalForm',
title: <FormattedMessage id="modalForm" />,
type: 'item',
url: '/modalForm',
icon: icons.IconHelp
},
{
id: 'sample-page',
title: <FormattedMessage id="sample-page" />,
type: 'item',
url: '/sample-page',
icon: icons.IconBrandChrome,
breadcrumbs: false
},
{
id: 'documentation',
title: <FormattedMessage id="documentation" />,
type: 'item',
url: 'https://codedthemes.gitbook.io/berry/',
icon: icons.IconHelp,
external: true,
target: true
}
// {
// id: 'draggableModal',
// title: <FormattedMessage id="DraggableModal" />,
// type: 'item',
// url: '/draggableModal',
// icon: icons.IconHelp
// }
]
};
export default other;
Loading…
Cancel
Save