LinkAwsMarketplaceLayout.tsx 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { useTheme } from 'next-themes'
  2. import Head from 'next/head'
  3. import Image from 'next/legacy/image'
  4. import type { PropsWithChildren } from 'react'
  5. import { Separator } from 'ui'
  6. import { withAuth } from '../../hooks/misc/withAuth'
  7. import { useCustomContent } from '@/hooks/custom-content/useCustomContent'
  8. import { BASE_PATH } from '@/lib/constants'
  9. export interface LinkAwsMarketplaceLayoutProps {}
  10. const LinkAwsMarketplaceLayout = ({
  11. children,
  12. }: PropsWithChildren<LinkAwsMarketplaceLayoutProps>) => {
  13. const { resolvedTheme } = useTheme()
  14. const { appTitle } = useCustomContent(['app:title'])
  15. return (
  16. <>
  17. <Head>
  18. <title>AWS Marketplace Setup | {appTitle || 'Briven'}</title>
  19. </Head>
  20. <main className="flex flex-col grow w-full h-full overflow-y-auto">
  21. <div>
  22. <div className="mx-auto px-4 sm:px-6">
  23. <div className="max-w-xl flex justify-between items-center py-4">
  24. <div className="flex justify-start lg:w-0 lg:flex-1">
  25. <div>
  26. <span className="sr-only">Briven</span>
  27. <Image
  28. src={
  29. resolvedTheme?.includes('dark')
  30. ? `${BASE_PATH}/img/briven-dark.svg`
  31. : `${BASE_PATH}/img/briven-light.svg`
  32. }
  33. alt="Briven Logo"
  34. height={20}
  35. width={105}
  36. />
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <Separator />
  43. <div className="flex flex-col justify-center grow mx-auto w-[90vw] space-y-4">
  44. {children}
  45. </div>
  46. </main>
  47. </>
  48. )
  49. }
  50. export default withAuth(LinkAwsMarketplaceLayout)