layout.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import Image from 'next/image'
  2. import { PropsWithChildren, ReactNode } from 'react'
  3. import { cn, Separator } from 'ui'
  4. import { UserDropdown } from '@/components/interfaces/UserDropdown'
  5. import { FeedbackDropdown } from '@/components/layouts/Navigation/LayoutHeader/FeedbackDropdown/FeedbackDropdown'
  6. import { BASE_PATH } from '@/lib/constants'
  7. export const ProjectClaimLayout = ({
  8. children,
  9. title,
  10. className,
  11. }: PropsWithChildren<{
  12. title: ReactNode
  13. className?: string
  14. }>) => {
  15. return (
  16. <>
  17. <div className="flex flex-row justify-between mx-auto w-full h-[52px] items-center px-4">
  18. <div className="flex items-center gap-2">
  19. <span className="sr-only">Briven</span>
  20. <Image
  21. src={`${BASE_PATH}/img/briven-logo.svg`}
  22. alt="Briven Logo"
  23. height={20}
  24. width={20}
  25. />
  26. <span className="truncate">{title}</span>
  27. </div>
  28. <div className="flex items-center gap-x-2">
  29. <FeedbackDropdown className="hidden xs:flex" />
  30. <UserDropdown />
  31. </div>
  32. </div>
  33. <Separator />
  34. <div
  35. className={cn(
  36. 'overflow-y-auto max-h-[calc(100vh-70px)] flex justify-center grow',
  37. className
  38. )}
  39. >
  40. <div className="w-full h-full max-w-md">{children}</div>
  41. </div>
  42. </>
  43. )
  44. }