menu from api

This commit is contained in:
tmshv committed 2021-09-18 17:31:54 +03:00
1 parent 7e856bce18
commit bc2f1f78fd
5 files changed
+45 -12

No files matched your search

+7 -3
View File
@@ -6,7 +6,7 @@ import { Footer } from '../Footer'
import { Content } from '../Content'
import { Block } from '../Block'
import { Breadcrumbs } from '../Breadcrumbs'
import { IBreadcumbsPart } from 'src/types'
import { IBreadcumbsPart, IMenu } from 'src/types'
import { useRouter } from 'next/router'
import { useMobile } from 'src/hooks/useMobile'
@@ -19,9 +19,10 @@ export interface IAppProps {
wide?: boolean
contentStyle?: React.CSSProperties
breadcrumbs?: IBreadcumbsPart[]
menu: IMenu[]
}
export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, ...props }) => {
export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, menu, ...props }) => {
const hideBreadcrumbs = useMobile()
const router = useRouter()
const blockStyle = {
@@ -29,7 +30,10 @@ export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, ...
}
return (
<ConfigContext.Provider value={config}>
<ConfigContext.Provider value={{
...config,
menu,
}}>
<Wrapper
header={(
<header>