mirror of
https://github.com/langgenius/dify.git
synced 2026-08-01 01:49:30 +08:00
28 lines
712 B
TypeScript
28 lines
712 B
TypeScript
'use client'
|
|
import { cn } from '@langgenius/dify-ui/cn'
|
|
import * as React from 'react'
|
|
import { usePathname } from '@/next/navigation'
|
|
import s from './index.module.css'
|
|
|
|
type HeaderWrapperProps = {
|
|
children: React.ReactNode
|
|
}
|
|
|
|
const HeaderWrapper = ({ children }: HeaderWrapperProps) => {
|
|
const pathname = usePathname()
|
|
const isBordered = ['/apps', '/snippets', '/datasets/create', '/tools'].includes(pathname)
|
|
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'sticky top-0 right-0 left-0 z-30 flex min-h-14 shrink-0 grow-0 basis-auto flex-col',
|
|
s.header,
|
|
isBordered ? 'border-b border-divider-regular' : '',
|
|
)}
|
|
>
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|
|
export default HeaderWrapper
|