"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 { HomeHeaderBackground } from "./components/HomeHeader/components/HomeHeaderBackground";
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 (
<>
>
);
} else {
return (
);
}
};
export default HomePage;