Optimize code
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import React from 'react'
|
||||
import Icon from '@ant-design/icons'
|
||||
import router from '@/router'
|
||||
import { COLOR_FONT_SECONDARY } from '@/constants/common.constants'
|
||||
import '@/assets/css/pages/home-framework.scss'
|
||||
import LoadingMask from '@/components/common/LoadingMask'
|
||||
import HideScrollbar, { HideScrollbarElement } from '@/components/common/HideScrollbar'
|
||||
import { COLOR_FONT_SECONDARY } from '@/constants/common.constants'
|
||||
|
||||
export const HomeFrameworkContext = createContext<{
|
||||
navbarHiddenState: {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import React from 'react'
|
||||
import { notification } from 'antd'
|
||||
import moment from 'moment'
|
||||
import '@/assets/css/pages/login.scss'
|
||||
import { setToken } from '@/utils/common'
|
||||
import { getUserInfo, login } from '@/utils/auth'
|
||||
import {
|
||||
SYSTEM_LOGIN_SUCCESS,
|
||||
SYSTEM_LOGIN_USERNAME_PASSWORD_ERROR,
|
||||
SYSTEM_USER_DISABLE,
|
||||
SYSTEM_USERNAME_NOT_FOUND
|
||||
} from '@/constants/common.constants'
|
||||
import '@/assets/css/pages/login.scss'
|
||||
import { setToken } from '@/utils/common'
|
||||
import { getUserInfo, login } from '@/utils/auth'
|
||||
import { notification } from 'antd'
|
||||
import moment from 'moment'
|
||||
|
||||
const Login: React.FC = () => {
|
||||
const [messageApi, contextHolder] = message.useMessage()
|
||||
|
||||
@@ -23,18 +23,13 @@ const ToolsFramework: React.FC = () => {
|
||||
<div className={'left-panel'}>
|
||||
<Sidebar title={'氮工具'} onSidebarSwitch={handleOnSidebarSwitch}>
|
||||
<SidebarItemList>
|
||||
<SidebarItem
|
||||
end
|
||||
path={''}
|
||||
icon={tools[0].icon}
|
||||
text={tools[0].name}
|
||||
></SidebarItem>
|
||||
<SidebarItem end path={''} icon={tools[0].icon} text={tools[0].name} />
|
||||
<SidebarItem
|
||||
end
|
||||
path={'all'}
|
||||
icon={tools[1].icon}
|
||||
text={tools[1].name}
|
||||
></SidebarItem>
|
||||
/>
|
||||
</SidebarItemList>
|
||||
<SidebarSeparate style={{ marginBottom: 0 }} />
|
||||
<SidebarScroll ref={sidebarScrollRef}>
|
||||
|
||||
Reference in New Issue
Block a user