mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
21 lines
562 B
TypeScript
21 lines
562 B
TypeScript
import type { ReactNode } from 'react'
|
|
import { headers } from '@/next/headers'
|
|
import MainNavLayoutClient from './layout'
|
|
import { getPlatformFromUserAgent } from './shortcut-platform'
|
|
|
|
export default async function MainNavLayout({
|
|
children,
|
|
detailSidebar,
|
|
}: {
|
|
children: ReactNode
|
|
detailSidebar?: ReactNode
|
|
}) {
|
|
const initialPlatform = getPlatformFromUserAgent((await headers()).get('user-agent'))
|
|
|
|
return (
|
|
<MainNavLayoutClient detailSidebar={detailSidebar} initialPlatform={initialPlatform}>
|
|
{children}
|
|
</MainNavLayoutClient>
|
|
)
|
|
}
|