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