header-wrapper.tsx 763 B

1234567891011121314151617181920212223242526272829303132
  1. 'use client'
  2. import { usePathname } from 'next/navigation'
  3. import s from './index.module.css'
  4. import classNames from '@/utils/classnames'
  5. type HeaderWrapperProps = {
  6. children: React.ReactNode
  7. }
  8. const HeaderWrapper = ({
  9. children,
  10. }: HeaderWrapperProps) => {
  11. const pathname = usePathname()
  12. const isBordered = ['/apps', '/datasets','/datasets', '/datasets/create', '/tools', '/account'].includes(pathname)
  13. return (
  14. <div
  15. // style={{
  16. // background:'#fff'
  17. // }
  18. // }
  19. className={classNames(
  20. 'sticky top-0 left-0 right-0 z-30 flex flex-col grow-0 shrink-0 basis-auto min-h-[56px]',
  21. s.header,
  22. isBordered ? 'border-b border-gray-200' : '',
  23. )}
  24. >
  25. {children}
  26. </div>
  27. )
  28. }
  29. export default HeaderWrapper