mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-29 15:10:06 +00:00
动态组件模式调整
This commit is contained in:
@@ -86,6 +86,11 @@ 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 />
|
||||
</SignedIn>
|
||||
</>
|
||||
|
||||
@@ -38,6 +38,16 @@ export const getGlobalLayoutByTheme = themeQuery => {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态获取布局
|
||||
* @param {*} props
|
||||
*/
|
||||
export const DynamicLayout = props => {
|
||||
const { router, theme } = props
|
||||
const SelectedLayout = getLayoutByTheme({ router, theme })
|
||||
return <SelectedLayout {...props} />
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载主题文件
|
||||
* 如果是
|
||||
|
||||
Reference in New Issue
Block a user