quivr/frontend/app/App.tsx
Mamadou DICKO 072d97adb1
feat: add prompt trigger through # (#1023)
* feat: add prompt trigger to mention input

* feat: update chat shortcuts

* test: update BrainProviderMock

* feat: improve ux

* feat: update message header position

* feat: improve mention input dx

* fix(MentionInput): fix minor bugs

* feat: refactor <ShareBrain/>

* feat: add brain sharing button

* fix: make popover buttons click working

* feat: update backspace handle logic

* feat: update add new brain button ui
2023-08-29 10:50:36 +02:00

35 lines
1.0 KiB
TypeScript

"use client";
import { PropsWithChildren, useEffect } from "react";
import Footer from "@/lib/components/Footer";
import { NavBar } from "@/lib/components/NavBar";
import { TrackingWrapper } from "@/lib/components/TrackingWrapper";
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
import { useSupabase } from "@/lib/context/SupabaseProvider";
import { UpdateMetadata } from "@/lib/helpers/updateMetadata";
import "../lib/config/LocaleConfig/i18n";
// This wrapper is used to make effect calls at a high level in app rendering.
export const App = ({ children }: PropsWithChildren): JSX.Element => {
const { fetchAllBrains, fetchAndSetActiveBrain, fetchPublicPrompts } =
useBrainContext();
const { session } = useSupabase();
useEffect(() => {
void fetchAllBrains();
void fetchAndSetActiveBrain();
void fetchPublicPrompts();
}, [session?.user]);
return (
<>
<TrackingWrapper />
<NavBar />
<div className="flex-1">{children}</div>
<Footer />
<UpdateMetadata />
</>
);
};