mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-02 11:18:19 +08:00
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import React from 'react'
|
|
import type { ReactNode } from 'react'
|
|
import SwrInitor from '@/app/components/swr-initor'
|
|
import { AppContextProvider } from '@/context/app-context'
|
|
import GA, { GaType } from '@/app/components/base/ga'
|
|
import HeaderWrapper from '@/app/components/header/HeaderWrapper'
|
|
import Header from '@/app/components/header'
|
|
import { EventEmitterContextProvider } from '@/context/event-emitter'
|
|
import { ProviderContextProvider } from '@/context/provider-context'
|
|
import { ModalContextProvider } from '@/context/modal-context'
|
|
|
|
const Layout = ({ children }: { children: ReactNode }) => {
|
|
return (
|
|
<>
|
|
<GA gaType={GaType.admin} />
|
|
<SwrInitor>
|
|
<AppContextProvider>
|
|
<EventEmitterContextProvider>
|
|
<ProviderContextProvider>
|
|
<ModalContextProvider>
|
|
<HeaderWrapper>
|
|
<Header />
|
|
</HeaderWrapper>
|
|
{children}
|
|
</ModalContextProvider>
|
|
</ProviderContextProvider>
|
|
</EventEmitterContextProvider>
|
|
</AppContextProvider>
|
|
</SwrInitor>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export const metadata = {
|
|
title: 'Dify',
|
|
}
|
|
|
|
export default Layout
|