2023-09-13 17:43:25 +03:00
|
|
|
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
|
|
|
|
|
|
import { useSupabase } from "@/lib/context/SupabaseProvider";
|
|
|
|
import { redirectToPreviousPageOrChatPage } from "@/lib/helpers/redirectToPreviousPageOrChatPage";
|
2023-06-15 12:52:46 +03:00
|
|
|
|
2023-10-17 11:57:27 +03:00
|
|
|
import {
|
|
|
|
DemoSection,
|
|
|
|
FooterSection,
|
|
|
|
HomeHeader,
|
|
|
|
HomeSection,
|
|
|
|
IntroSection,
|
|
|
|
SecuritySection,
|
|
|
|
TestimonialsSection,
|
|
|
|
} from "./components";
|
2023-10-20 16:38:35 +03:00
|
|
|
import { HomeHeaderBackground } from "./components/HomeHeader/components/HomeHeaderBackground";
|
2023-10-17 14:36:15 +03:00
|
|
|
import { UseCases } from "./components/UseCases/UseCases";
|
2023-05-18 14:37:03 +03:00
|
|
|
|
2023-06-15 12:52:46 +03:00
|
|
|
const HomePage = (): JSX.Element => {
|
2023-09-13 17:43:25 +03:00
|
|
|
const { session } = useSupabase();
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
if (session?.user !== undefined) {
|
|
|
|
redirectToPreviousPageOrChatPage();
|
|
|
|
}
|
|
|
|
}, [session?.user]);
|
2023-05-21 02:20:55 +03:00
|
|
|
|
2023-10-26 10:05:21 +03:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<HomeHeaderBackground />
|
|
|
|
<HomeHeader />
|
2023-10-11 19:36:16 +03:00
|
|
|
|
2023-10-26 10:05:21 +03:00
|
|
|
<main
|
|
|
|
className="relative flex flex-col items-center"
|
|
|
|
data-testid="home-page"
|
|
|
|
>
|
|
|
|
<HomeSection bg="transparent">
|
|
|
|
<IntroSection />
|
|
|
|
</HomeSection>
|
2023-10-17 11:57:27 +03:00
|
|
|
|
2023-10-26 10:05:21 +03:00
|
|
|
<HomeSection bg="bg-[#FCFAF6]" slantAfter="down" hiddenOnMobile={true}>
|
|
|
|
<DemoSection />
|
|
|
|
</HomeSection>
|
2023-10-17 11:57:27 +03:00
|
|
|
|
2023-10-26 10:05:21 +03:00
|
|
|
<HomeSection
|
|
|
|
bg="bg-[#362469]"
|
|
|
|
slantCurrent="down"
|
|
|
|
gradient="bg-gradient-to-t bg-gradient-to-t from-white to-[#362469]"
|
|
|
|
>
|
|
|
|
<UseCases />
|
|
|
|
<div />
|
|
|
|
</HomeSection>
|
2023-10-17 11:57:27 +03:00
|
|
|
|
2023-10-26 10:05:21 +03:00
|
|
|
<HomeSection bg="bg-white" slantBefore="down" slantAfter="up">
|
|
|
|
<SecuritySection />
|
|
|
|
</HomeSection>
|
2023-10-17 11:57:27 +03:00
|
|
|
|
2023-10-26 10:05:21 +03:00
|
|
|
<HomeSection bg="bg-[#FCFAF6]" slantCurrent="up">
|
|
|
|
<TestimonialsSection />
|
|
|
|
</HomeSection>
|
2023-10-17 11:57:27 +03:00
|
|
|
|
2023-10-26 10:05:21 +03:00
|
|
|
<HomeSection
|
|
|
|
bg="bg-gradient-to-b from-[#D07DF9] to-[#7A27FD]"
|
|
|
|
slantBefore="up"
|
|
|
|
>
|
|
|
|
<FooterSection />
|
|
|
|
</HomeSection>
|
2023-10-11 19:36:16 +03:00
|
|
|
</main>
|
2023-10-26 10:05:21 +03:00
|
|
|
</>
|
|
|
|
);
|
2023-06-15 12:52:46 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
export default HomePage;
|