mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-22 15:09:43 +00:00
theme-commerce
This commit is contained in:
33
themes/commerce/components/SideBar.js
Normal file
33
themes/commerce/components/SideBar.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import LazyImage from '@/components/LazyImage'
|
||||
import { useRouter } from 'next/router'
|
||||
import MenuGroupCard from './MenuGroupCard'
|
||||
import { MenuListSide } from './MenuListSide'
|
||||
|
||||
/**
|
||||
* 侧边抽屉
|
||||
* @param tags
|
||||
* @param currentTag
|
||||
* @returns {JSX.Element}
|
||||
* @constructor
|
||||
*/
|
||||
const SideBar = (props) => {
|
||||
const { siteInfo } = props
|
||||
const router = useRouter()
|
||||
return (
|
||||
<div id='side-bar'>
|
||||
<div className="h-52 w-full flex justify-center">
|
||||
<div>
|
||||
<div onClick={() => { router.push('/') }}
|
||||
className='justify-center items-center flex hover:rotate-45 py-6 hover:scale-105 dark:text-gray-100 transform duration-200 cursor-pointer'>
|
||||
<LazyImage src={siteInfo?.icon} className='rounded-full' width={80} alt={siteConfig('AUTHOR')} />
|
||||
</div>
|
||||
<MenuGroupCard {...props} />
|
||||
</div>
|
||||
</div>
|
||||
<MenuListSide {...props} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default SideBar
|
||||
Reference in New Issue
Block a user