Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with Prettier and StandardJS #292

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/pages/layout/proHeader/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const ProHeader = () => {
icon: <UserOutlined />,
onClick: () => {
redirectTo('/profile')
},
}
},
{
key: '2',
label: <Space>个人设置</Space>,
icon: <SmileOutlined />,
onClick: () => {
redirectTo('/setting')
},
}
},
{
key: '3',
Expand All @@ -51,8 +51,8 @@ const ProHeader = () => {
onClick: () => {
removeLocalStorage('token')
redirectTo('/signin')
},
},
}
}
]

const { myTheme, setMyTheme } = useProThemeContext()
Expand All @@ -62,15 +62,15 @@ const ProHeader = () => {
}

const {
token: { colorBgContainer, colorBorder },
token: { colorBgContainer, colorBorder }
} = theme.useToken()

return (
<Layout.Header
className={styles.header}
style={{ background: colorBgContainer, borderBottom: `1px solid ${colorBorder}` }}
>
<div aria-hidden="true" className={styles.logo} onClick={() => redirectTo('/')}>
<div aria-hidden='true' className={styles.logo} onClick={() => redirectTo('/')}>
{/* Pro React <Tag>{process.env.DEPLOYED_ENV}</Tag> */}
Pro React Admin
</div>
Expand All @@ -79,7 +79,7 @@ const ProHeader = () => {
<PrimaryNav />
</div>
<div className={styles.headerRight}>
<Space direction="horizontal" style={{ cursor: 'pointer', paddingRight: 8 }}>
<Space direction='horizontal' style={{ cursor: 'pointer', paddingRight: 8 }}>
<Switch
// checkedChildren={<Icon component={LightSvg} />}
// unCheckedChildren={<Icon component={DarkSvg} />}
Expand All @@ -93,7 +93,7 @@ const ProHeader = () => {
<Dropdown
arrow
menu={{
items,
items
}}
>
<Space>
Expand Down
24 changes: 12 additions & 12 deletions src/pages/layout/proSecNav/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
QuestionCircleOutlined,
FireOutlined,
GlobalOutlined,
QrcodeOutlined,
QrcodeOutlined
} from '@ant-design/icons'

import styles from './index.module.less'
Expand All @@ -19,7 +19,7 @@ const pathSubmenu = {
'/home': ['home'],
'/coupons/add': ['/sub-act', '/sub-coupons'],
'/coupons/edit': ['/sub-act', '/sub-coupons'],
'/product': ['/sub-act', '/sub-coupons'],
'/product': ['/sub-act', '/sub-coupons']
}

const ProSecNav = () => {
Expand Down Expand Up @@ -88,38 +88,38 @@ const ProSecNav = () => {
icon: <FireOutlined />,
children: [
{ label: 'Vue', key: '/coupons/add' },
{ label: 'Angular', key: '/coupons/edit' },
],
{ label: 'Angular', key: '/coupons/edit' }
]
},
{ label: '后端技术栈', key: '/product', icon: <DeploymentUnitOutlined /> },
],
{ label: '后端技术栈', key: '/product', icon: <DeploymentUnitOutlined /> }
]
},
{
label: '构建工具',
key: '/sub-list',
icon: <ApartmentOutlined />,
children: [
{ label: 'Webpack', key: '/coupons/list' },
{ label: 'Vite', key: '/order/list' },
],
{ label: 'Vite', key: '/order/list' }
]
},
{
label: 'Error',
key: '/sub-error',
icon: <QuestionCircleOutlined />,
children: [{ label: 'ErrorBoundary', key: '/error' }],
},
children: [{ label: 'ErrorBoundary', key: '/error' }]
}
]

return (
<>
<Menu
mode="inline"
mode='inline'
defaultSelectedKeys={selectedKeys}
defaultOpenKeys={openKeys}
selectedKeys={selectedKeys}
openKeys={openKeys}
theme="light"
theme='light'
className={styles.menu}
onOpenChange={onOpenChange}
onSelect={onSelect}
Expand Down