mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-21 05:11:35 +03:00
2b4c3ecbbc
* 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
28 lines
608 B
TypeScript
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;
|