Skip to content

Commit

Permalink
fix: 🐛 完善前端
Browse files Browse the repository at this point in the history
  • Loading branch information
tcly861204 committed Mar 8, 2024
1 parent 9e1d014 commit e1064b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/layout/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}
.logo {
padding: 10px 15px;
cursor: pointer;
:local {
h1 {
margin: 0;
Expand Down
7 changes: 6 additions & 1 deletion src/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
IconMenuUnfold,
IconMenuFold,
} from '@arco-design/web-react/icon'
import { useNavigate } from 'react-router-dom'
import Sidebar from '@/components/Sidebar'
import Toolbar from '@/components/ToolBar'
import logoImg from '@/assets/logo.png'
Expand All @@ -13,14 +14,18 @@ import menuConfig from './menu'
import styles from './index.module.scss'

const App = () => {
const navigate = useNavigate()
const { collapse, updateField } = useStore(state => state)
const onCollapse = useCallback((collapsed: boolean) => {
updateField('collapse', collapsed)
}, [updateField])
const goHome = useCallback(() => {
navigate('/')
}, [navigate])
return <Layout className={styles.container}>
<Layout.Header>
<div className={styles.navbar}>
<div className={styles.logo}>
<div className={styles.logo} onClick={goHome}>
<h1><img src={logoImg} /><span>amis</span></h1>
</div>
<Toolbar />
Expand Down

0 comments on commit e1064b5

Please sign in to comment.