1+ import { Flex , Paper , Anchor } from '@mantine/core' ;
2+ import { PropsWithChildren } from 'react' ;
3+ import Link from 'next/link' ;
14import Head from 'next/head' ;
25import Image from 'next/image' ;
36import dynamic from 'next/dynamic' ;
4- import { PropsWithChildren } from 'react' ;
5- import { Carousel } from '@mantine/carousel' ;
67import { useQuery } from '@tanstack/react-query' ;
7- import { Grid , Title , Text , Stack } from '@mantine/core' ;
88
99import { commonApi } from '@libs/api' ;
10- import { API_KEYS , TEXTS } from '@config' ;
10+ import { API_KEYS , colors , CONSTANTS , TEXTS } from '@config' ;
1111import { IErrorObject } from '@impler/shared' ;
12+ import DarkLogo from '@assets/images/logo-dark.png' ;
1213
13- import useStyles from './OnboardLayout.styles' ;
1414import { useAppState } from 'store/app.context' ;
15- import WidgetSlideImage from '@assets/images/auth-carousel/widget.png' ;
16- import PowerfullSlideImage from '@assets/images/auth-carousel/powerfull.png' ;
17- import UncertainitySlideImage from '@assets/images/auth-carousel/uncertainity.png' ;
1815
1916const Support = dynamic ( ( ) => import ( 'components/common/Support' ) . then ( ( mod ) => mod . Support ) , {
2017 ssr : false ,
2118} ) ;
2219
23- const slides : {
24- image : any ;
25- title : string ;
26- subtitle : string ;
27- } [ ] = [
28- {
29- image : WidgetSlideImage ,
30- title : 'Guided Import Widget' ,
31- subtitle : 'Within few minutes add scalable and production ready import widget to your application.' ,
32- } ,
33- {
34- image : UncertainitySlideImage ,
35- title : 'Remove Uncertainity from Data' ,
36- subtitle : 'Missing values, invalid format, empty rows and unknown column names gets handled automatically.' ,
37- } ,
38- {
39- image : PowerfullSlideImage ,
40- title : 'Stay Powerful' ,
41- subtitle : `Don't let old and buggy data import cross your way to scale and making your users happy.` ,
42- } ,
43- ] ;
20+ type OnboardLayoutProps = PropsWithChildren ;
4421
45- export function OnboardLayout ( { children } : PropsWithChildren ) {
46- const { classes } = useStyles ( ) ;
22+ export function OnboardLayout ( { children } : OnboardLayoutProps ) {
4723 const { setProfileInfo } = useAppState ( ) ;
4824 useQuery < unknown , IErrorObject , IProfileData , [ string ] > (
4925 [ API_KEYS . ME ] ,
@@ -70,28 +46,36 @@ export function OnboardLayout({ children }: PropsWithChildren) {
7046 < meta name = "og:description" content = { TEXTS . SEO_DESCRIPTION } />
7147 </ Head >
7248 < main >
73- < Grid className = { classes . grid } gutter = { 0 } >
74- < Grid . Col md = { 6 } className = { classes . contentCol } >
75- < div className = { classes . contentContainer } > { children } </ div >
76- </ Grid . Col >
77- < Grid . Col md = { 6 } className = { classes . carouselCol } >
78- < Carousel loop slideGap = "md" withIndicators classNames = { classes } >
79- { slides . map ( ( slide , index ) => (
80- < Carousel . Slide key = { index } className = { classes . slide } h = "100%" >
81- < Image src = { slide . image } height = { 650 } alt = "Feature rich actions" className = { classes . image } />
82- < Stack className = "content" spacing = { 10 } px = "lg" >
83- < Title order = { 1 } align = "center" color = "white" className = "title" >
84- { slide . title }
85- </ Title >
86- < Text size = "lg" fw = { 500 } align = "center" color = "white" className = "subtitle" >
87- { slide . subtitle }
88- </ Text >
89- </ Stack >
90- </ Carousel . Slide >
91- ) ) }
92- </ Carousel >
93- </ Grid . Col >
94- </ Grid >
49+ < Flex direction = "column" mih = "100vh" >
50+ { /* Header with logo and help links */ }
51+ < Flex p = "xs" align = "center" justify = "space-between" >
52+ < Image src = { DarkLogo } width = { 30 } height = { 35 } alt = "Impler Logo" />
53+
54+ < Flex gap = "xs" align = "center" >
55+ < Link href = { CONSTANTS . IMPLER_DOCUMENTATION } passHref legacyBehavior >
56+ < Anchor underline = { false } component = "a" fw = { 600 } c = "white" fz = "sm" >
57+ Need Help ?
58+ </ Anchor >
59+ </ Link >
60+
61+ < Anchor
62+ underline = { false }
63+ href = { CONSTANTS . IMPLER_CAL_QUICK_MEETING }
64+ fw = { 600 }
65+ c = { colors . goldenYellow }
66+ fz = "sm"
67+ >
68+ Get in Touch
69+ </ Anchor >
70+ </ Flex >
71+ </ Flex >
72+
73+ < Flex style = { { flexGrow : 1 } } align = "center" justify = "center" >
74+ < Paper withBorder radius = "md" p = "lg" w = { 600 } maw = "90%" >
75+ { children }
76+ </ Paper >
77+ </ Flex >
78+ </ Flex >
9579 </ main >
9680 < Support />
9781 </ >
0 commit comments