Download web/app/components/header/header-wrapper.tsx from ZHZ1024/dify: direct link, hf CLI and curl.
- Browser
- Download file 685 Bytes
-
https://huggingface.co/spaces/ZHZ1024/dify/resolve/main/web/app/components/header/header-wrapper.tsx
- Command line
-
hf download hf://spaces/ZHZ1024/dify/web/app/components/header/header-wrapper.tsx
-
curl -L -o header-wrapper.tsx https://huggingface.co/spaces/ZHZ1024/dify/resolve/main/web/app/components/header/header-wrapper.tsx
685 Bytes
| 'use client' | |
| import { usePathname } from 'next/navigation' | |
| import s from './index.module.css' | |
| import classNames from '@/utils/classnames' | |
| type HeaderWrapperProps = { | |
| children: React.ReactNode | |
| } | |
| const HeaderWrapper = ({ | |
| children, | |
| }: HeaderWrapperProps) => { | |
| const pathname = usePathname() | |
| const isBordered = ['/apps', '/datasets', '/datasets/create', '/tools', '/account'].includes(pathname) | |
| return ( | |
| <div className={classNames( | |
| 'sticky top-0 left-0 right-0 z-30 flex flex-col grow-0 shrink-0 basis-auto min-h-[56px]', | |
| s.header, | |
| isBordered ? 'border-b border-gray-200' : '', | |
| )} | |
| > | |
| {children} | |
| </div> | |
| ) | |
| } | |
| export default HeaderWrapper | |