dify/web/app/(commonLayout)/layout.tsx

27 lines
610 B
TypeScript
Raw Normal View History

2023-06-29 15:30:12 +08:00
import React from 'react'
import type { ReactNode } from 'react'
import SwrInitor from '@/app/components/swr-initor'
import { AppContextProvider } from '@/context/app-context'
2023-05-15 08:51:32 +08:00
import GA, { GaType } from '@/app/components/base/ga'
2023-06-29 15:30:12 +08:00
import Header from '@/app/components/header'
2023-05-15 08:51:32 +08:00
2023-06-29 15:30:12 +08:00
const Layout = ({ children }: { children: ReactNode }) => {
2023-05-15 08:51:32 +08:00
return (
<>
<GA gaType={GaType.admin} />
2023-06-29 15:30:12 +08:00
<SwrInitor>
<AppContextProvider>
<Header />
{children}
</AppContextProvider>
</SwrInitor>
2023-05-15 08:51:32 +08:00
</>
)
}
export const metadata = {
title: 'Dify',
}
2023-06-29 15:30:12 +08:00
export default Layout