mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-04 23:16:53 +00:00
fix: 修复 eslint 报错
This commit is contained in:
@@ -79,17 +79,17 @@ export const getBaseLayoutByTheme = theme => {
|
||||
*/
|
||||
export const DynamicLayout = props => {
|
||||
const { theme, layoutName } = props
|
||||
const SelectedLayout = getLayoutByTheme({ layoutName, theme })
|
||||
const SelectedLayout = useLayoutByTheme({ layoutName, theme })
|
||||
return <SelectedLayout {...props} />
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载主题文件
|
||||
* @param {*} router
|
||||
* @param {*} layoutName
|
||||
* @param {*} theme
|
||||
* @returns
|
||||
*/
|
||||
export const getLayoutByTheme = ({ layoutName, theme }) => {
|
||||
export const useLayoutByTheme = ({ layoutName, theme }) => {
|
||||
// const layoutName = getLayoutNameByPath(router.pathname, router.asPath)
|
||||
const LayoutComponents =
|
||||
ThemeComponents[layoutName] || ThemeComponents.LayoutSlug
|
||||
|
||||
Reference in New Issue
Block a user