
Co-authored-by: GuanMu <ballmanjq@gmail.com> Co-authored-by: zhujiruo <zhujiruo@foxmail.com> Co-authored-by: Matri Qi <matrixdom@126.com> Co-authored-by: croatialu <wuli.croatia@foxmail.com> Co-authored-by: HyaCinth <88471803+HyaCiovo@users.noreply.github.com> Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import React from 'react'
|
|
import type { ReactNode } from 'react'
|
|
import SwrInitializer from '@/app/components/swr-initializer'
|
|
import { AppContextProvider } from '@/context/app-context'
|
|
import GA, { GaType } from '@/app/components/base/ga'
|
|
import HeaderWrapper from '@/app/components/header/header-wrapper'
|
|
import Header from '@/app/components/header'
|
|
import { EventEmitterContextProvider } from '@/context/event-emitter'
|
|
import { ProviderContextProvider } from '@/context/provider-context'
|
|
import { ModalContextProvider } from '@/context/modal-context'
|
|
import GotoAnything from '@/app/components/goto-anything'
|
|
|
|
const Layout = ({ children }: { children: ReactNode }) => {
|
|
return (
|
|
<>
|
|
<GA gaType={GaType.admin} />
|
|
<SwrInitializer>
|
|
<AppContextProvider>
|
|
<EventEmitterContextProvider>
|
|
<ProviderContextProvider>
|
|
<ModalContextProvider>
|
|
<HeaderWrapper>
|
|
<Header />
|
|
</HeaderWrapper>
|
|
{children}
|
|
<GotoAnything />
|
|
</ModalContextProvider>
|
|
</ProviderContextProvider>
|
|
</EventEmitterContextProvider>
|
|
</AppContextProvider>
|
|
</SwrInitializer>
|
|
</>
|
|
)
|
|
}
|
|
export default Layout
|