mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 15:10:37 +00:00
新增dashboard组件
This commit is contained in:
@@ -86,12 +86,13 @@ export const Header = props => {
|
||||
</div>
|
||||
</SignedOut>
|
||||
<SignedIn>
|
||||
<Link
|
||||
href='/dashboard'
|
||||
className='bg-black hover:bg-gray-900 text-white py-2 px-4 rounded-lg '>
|
||||
Dashboard
|
||||
</Link>
|
||||
<UserButton />
|
||||
|
||||
<button
|
||||
type='button'
|
||||
className='text-white bg-gray-800 hover:bg-gray-900 hover:ring-4 hover:ring-gray-300 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700'>
|
||||
<Link href='/dashboard'>Dashboard</Link>
|
||||
</button>
|
||||
</SignedIn>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -27,6 +27,8 @@ import { Style } from './style'
|
||||
import Comment from '@/components/Comment'
|
||||
import replaceSearchResult from '@/components/Mark'
|
||||
import ShareBar from '@/components/ShareBar'
|
||||
import DashboardBody from '@/components/ui/dashboard/DashboardBody'
|
||||
import DashboardHeader from '@/components/ui/dashboard/DashboardHeader'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import { loadWowJS } from '@/lib/plugins/wow'
|
||||
import { SignIn, SignUp } from '@clerk/nextjs'
|
||||
@@ -176,7 +178,39 @@ const LayoutSlug = props => {
|
||||
</>
|
||||
)
|
||||
}
|
||||
/**
|
||||
* 仪表盘
|
||||
* @param {*} props
|
||||
* @returns
|
||||
*/
|
||||
const LayoutDashboard = props => {
|
||||
const { post } = props
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className='container grow'>
|
||||
<div className='flex flex-wrap justify-center -mx-4'>
|
||||
<div id='container-inner' className='w-full p-4'>
|
||||
{post && (
|
||||
<div id='article-wrapper' className='mx-auto'>
|
||||
<NotionPage {...props} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* 仪表盘 */}
|
||||
<DashboardHeader />
|
||||
<DashboardBody />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
* @param {*} props
|
||||
* @returns
|
||||
*/
|
||||
const LayoutSearch = props => {
|
||||
const { keyword } = props
|
||||
const router = useRouter()
|
||||
@@ -491,6 +525,7 @@ export {
|
||||
LayoutArchive,
|
||||
LayoutBase,
|
||||
LayoutCategoryIndex,
|
||||
LayoutDashboard,
|
||||
LayoutIndex,
|
||||
LayoutPostList,
|
||||
LayoutSearch,
|
||||
|
||||
Reference in New Issue
Block a user