quivr/frontend/app/(home)/page.tsx
Matthieu Jacq 220a062340
feat: HomePage new footer (#1425)
# Description

Footer section

Epic: #1232 
US: #1422

## Screenshots (if appropriate):

<img width="1127" alt="image"
src="https://github.com/StanGirard/quivr/assets/67386567/b8d5410b-7f1d-49fe-b3e6-87dec5e18529">
2023-10-18 16:25:48 +02:00

87 lines
2.0 KiB
TypeScript

"use client";
import { useFeatureIsOn } from "@growthbook/growthbook-react";
import { useEffect } from "react";
import { useSupabase } from "@/lib/context/SupabaseProvider";
import { redirectToPreviousPageOrChatPage } from "@/lib/helpers/redirectToPreviousPageOrChatPage";
import Features from "./Features";
import Hero from "./Hero";
import {
DemoSection,
FooterSection,
HomeHeader,
HomeSection,
IntroSection,
SecuritySection,
TestimonialsSection,
} from "./components";
import { UseCases } from "./components/UseCases/UseCases";
const HomePage = (): JSX.Element => {
const { session } = useSupabase();
useEffect(() => {
if (session?.user !== undefined) {
redirectToPreviousPageOrChatPage();
}
}, [session?.user]);
const isNewHomePage = useFeatureIsOn("new-homepage-activated");
if (isNewHomePage) {
return (
<>
<HomeHeader />
<main className="relative flex flex-col items-center">
<HomeSection bg="transparent">
<IntroSection />
</HomeSection>
<HomeSection
bg="bg-[#FCFAF6]"
slantAfter="down"
hiddenOnMobile={true}
>
<DemoSection />
</HomeSection>
<HomeSection
bg="bg-[#362469]"
slantCurrent="down"
className="bg-gradient-to-b from-[#362469] from-75% to-white"
>
<UseCases />
<div />
</HomeSection>
<HomeSection bg="bg-white" slantBefore="down" slantAfter="up">
<SecuritySection />
</HomeSection>
<HomeSection bg="bg-[#FCFAF6]" slantCurrent="up">
<TestimonialsSection />
</HomeSection>
<HomeSection
bg="bg-gradient-to-b from-[#D07DF9] to-[#7A27FD]"
slantBefore="up"
>
<FooterSection />
</HomeSection>
</main>
</>
);
} else {
return (
<main data-testid="home-page">
<Hero />
<Features />
</main>
);
}
};
export default HomePage;