Files
dify/web/app/components/header/HeaderWrapper.tsx
T
+17 45deaee762 feat: workflow new nodes (#4683)
Co-authored-by: Joel <[email protected]>
Co-authored-by: Patryk Garstecki <[email protected]>
Co-authored-by: Sebastian.W <[email protected]>
Co-authored-by: 呆萌闷油瓶 <[email protected]>
Co-authored-by: takatost <[email protected]>
Co-authored-by: rechardwang <[email protected]>
Co-authored-by: Nite Knite <[email protected]>
Co-authored-by: Chenhe Gu <[email protected]>
Co-authored-by: Joshua <[email protected]>
Co-authored-by: Weaxs <[email protected]>
Co-authored-by: Ikko Eltociear Ashimine <[email protected]>
Co-authored-by: leejoo0 <[email protected]>
Co-authored-by: JzoNg <[email protected]>
Co-authored-by: sino <[email protected]>
Co-authored-by: Vikey Chen <[email protected]>
Co-authored-by: wanghl <[email protected]>
Co-authored-by: Haolin Wang-汪皓临 <[email protected]>
Co-authored-by: Zixuan Cheng <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: Bowen Liang <[email protected]>
Co-authored-by: Bowen Liang <[email protected]>
Co-authored-by: fanghongtai <[email protected]>
Co-authored-by: wxfanghongtai <[email protected]>
Co-authored-by: Matri <[email protected]>
Co-authored-by: Benjamin <[email protected]>
2024-05-27 21:57:08 +08:00

28 lines
677 B
TypeScript

'use client'
import classNames from 'classnames'
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', '/datasets', '/datasets/create', '/tools'].includes(pathname)
return (
<div className={classNames(
'sticky top-0 left-0 right-0 z-20 flex flex-col bg-gray-100 grow-0 shrink-0 basis-auto min-h-[56px]',
s.header,
isBordered ? 'border-b border-gray-200' : '',
)}
>
{children}
</div>
)
}
export default HeaderWrapper