layout.tsx 610 B

1234567891011121314151617181920212223242526
  1. import React from 'react'
  2. import type { ReactNode } from 'react'
  3. import SwrInitor from '@/app/components/swr-initor'
  4. import { AppContextProvider } from '@/context/app-context'
  5. import GA, { GaType } from '@/app/components/base/ga'
  6. import Header from '@/app/components/header'
  7. const Layout = ({ children }: { children: ReactNode }) => {
  8. return (
  9. <>
  10. <GA gaType={GaType.admin} />
  11. <SwrInitor>
  12. <AppContextProvider>
  13. <Header />
  14. {children}
  15. </AppContextProvider>
  16. </SwrInitor>
  17. </>
  18. )
  19. }
  20. export const metadata = {
  21. title: 'Dify',
  22. }
  23. export default Layout