2021-11-16 22:52:23 +01:00
|
|
|
import Card from "../components/Card";
|
|
|
|
import { useSession } from "next-auth/client";
|
|
|
|
import { Text } from "@chakra-ui/react";
|
|
|
|
import Hero from "../components/Hero/Hero";
|
|
|
|
import { CTA } from "../components/CTA";
|
|
|
|
import { Features } from "../components/Features/Features";
|
|
|
|
import { Footer } from "../components/Footer/Footer";
|
|
|
|
import { motion } from "framer-motion";
|
|
|
|
import StatCard from "../components/StatCard";
|
|
|
|
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-29 03:14:33 +02:00
|
|
|
const container = {
|
|
|
|
hidden: { opacity: 1, scale: 0 },
|
|
|
|
visible: {
|
|
|
|
opacity: 1,
|
|
|
|
scale: 1,
|
|
|
|
transition: {
|
|
|
|
delayChildren: 0.4,
|
2021-11-16 22:52:23 +01:00
|
|
|
staggerChildren: 0.3,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2021-06-29 03:14:33 +02:00
|
|
|
|
2021-11-16 22:52:23 +01:00
|
|
|
const [session, loading] = useSession();
|
2021-06-20 13:39:00 +02:00
|
|
|
return (
|
2021-06-29 01:58:12 +02:00
|
|
|
<>
|
2021-11-16 22:52:23 +01:00
|
|
|
{!session && (
|
|
|
|
<>
|
|
|
|
<Hero />
|
|
|
|
<Features />
|
|
|
|
<Testimonials />
|
|
|
|
<CTA />
|
|
|
|
<Footer />
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
{session && (
|
|
|
|
<>
|
|
|
|
<Text fontSize="4xl">Welcome {session.user.name}!</Text>
|
|
|
|
<motion.div
|
|
|
|
className="grid"
|
|
|
|
variants={container}
|
|
|
|
initial="hidden"
|
|
|
|
animate="visible"
|
|
|
|
exit={{ opacity: 0 }}
|
|
|
|
>
|
|
|
|
<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 />
|
|
|
|
</motion.div>
|
|
|
|
</>
|
|
|
|
)}
|
2021-06-20 13:39:00 +02:00
|
|
|
</>
|
2021-11-16 22:52:23 +01:00
|
|
|
);
|
|
|
|
}
|