2021-06-24 10:48:39 +02:00
|
|
|
import Card from '../components/Card'
|
2021-06-21 12:23:41 +02:00
|
|
|
import { useSession } from 'next-auth/client'
|
2021-06-27 15:49:16 +02:00
|
|
|
import { Text } from "@chakra-ui/react"
|
2021-06-28 06:19:32 +02:00
|
|
|
import Hero from '../components/Hero/Hero'
|
2021-06-29 01:58:12 +02:00
|
|
|
import { CTA } from '../components/CTA'
|
2021-06-28 15:58:43 +02:00
|
|
|
import { Features } from '../components/Features/Features'
|
2021-06-29 04:01:14 +02:00
|
|
|
import { Footer } from '../components/Footer/Footer'
|
|
|
|
import { motion } from 'framer-motion'
|
2021-06-30 03:37:09 +02:00
|
|
|
import StatCard from '../components/StatCard'
|
2021-07-05 11:41:32 +02:00
|
|
|
import Testimonials from '../components/Testimonials/Testimonials'
|
|
|
|
import AuthButton from '../components/AuthButton'
|
2021-06-20 13:39:00 +02:00
|
|
|
|
|
|
|
export default function Home() {
|
2021-06-21 12:23:41 +02:00
|
|
|
|
2021-06-29 03:14:33 +02:00
|
|
|
const container = {
|
|
|
|
hidden: { opacity: 1, scale: 0 },
|
|
|
|
visible: {
|
|
|
|
opacity: 1,
|
|
|
|
scale: 1,
|
|
|
|
transition: {
|
|
|
|
delayChildren: 0.4,
|
|
|
|
staggerChildren: 0.3
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-06-21 12:23:41 +02:00
|
|
|
const [session, loading] = useSession()
|
|
|
|
|
2021-06-20 13:39:00 +02:00
|
|
|
return (
|
2021-06-29 01:58:12 +02:00
|
|
|
|
|
|
|
<>
|
|
|
|
{!session && <>
|
2021-07-05 11:41:32 +02:00
|
|
|
<Hero/>
|
2021-06-29 01:58:12 +02:00
|
|
|
<Features />
|
2021-07-05 11:41:32 +02:00
|
|
|
<Testimonials/>
|
2021-06-29 01:58:12 +02:00
|
|
|
<CTA />
|
|
|
|
<Footer />
|
|
|
|
</>
|
|
|
|
}
|
|
|
|
{session && <>
|
|
|
|
<Text fontSize='4xl'>Welcome {session.user.name}!</Text>
|
2021-06-29 04:01:14 +02:00
|
|
|
<motion.div className='grid' variants={container} initial="hidden" animate="visible" exit={{ opacity: 0 }}>
|
2021-06-30 03:37:09 +02:00
|
|
|
<Card title='commands' desc='lorem ipsum dolor sit amet' link='/controlpanel/commands'/>
|
|
|
|
<Card title='commands' desc='lorem ipsum dolor sit amet' link='/controlpanel/commands'/>
|
|
|
|
<Card title='commands' desc='lorem ipsum dolor sit amet' link='/controlpanel/commands'/>
|
|
|
|
<Card title='commands' desc='lorem ipsum dolor sit amet' link='/controlpanel/commands'/>
|
|
|
|
<Card title='commands' desc='lorem ipsum dolor sit amet' link='/controlpanel/commands'/>
|
|
|
|
<Card title='commands' desc='lorem ipsum dolor sit amet' link='/controlpanel/commands'/>
|
|
|
|
<StatCard/>
|
2021-06-29 03:14:33 +02:00
|
|
|
</motion.div>
|
2021-06-29 01:58:12 +02:00
|
|
|
</>
|
|
|
|
}
|
2021-06-20 13:39:00 +02:00
|
|
|
</>
|
|
|
|
)
|
2021-06-29 04:01:14 +02:00
|
|
|
}
|