quivr/frontend/app/(home)/page.tsx
Mamadou DICKO 2b4c3ecbbc
feat: update header and improve ux (#1164)
* feat: add Knowledge tab

* feat: use tanstack query for knowledges fetching

* feat: update header

* feat: remove upload page

* feat: make chat page the default redirection page

* feat(homePage): redirect user to chat page when already authenticated
2023-09-13 16:43:25 +02:00

28 lines
608 B
TypeScript

"use client";
import { useEffect } from "react";
import { useSupabase } from "@/lib/context/SupabaseProvider";
import { redirectToPreviousPageOrChatPage } from "@/lib/helpers/redirectToPreviousPageOrChatPage";
import Features from "./Features";
import Hero from "./Hero";
const HomePage = (): JSX.Element => {
const { session } = useSupabase();
useEffect(() => {
if (session?.user !== undefined) {
redirectToPreviousPageOrChatPage();
}
}, [session?.user]);
return (
<main data-testid="home-page">
<Hero />
<Features />
</main>
);
};
export default HomePage;