mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-17 23:51:51 +03:00
0cc917ea9e
Issue: https://github.com/StanGirard/quivr/issues/1884 - Add new sidebar (Menu) - Add Menu to App level (shared accross all pages) and display it only on chat bar - Remove chatlist from sidebar (they are now accessible through Actions bar (plus button on right of chat input) - Move notification banner to App.tsx - Update translations Demo: https://github.com/StanGirard/quivr/assets/63923024/53b1bf3b-db1a-49d7-ae84-80423d66ec03
34 lines
864 B
TypeScript
34 lines
864 B
TypeScript
"use client";
|
|
import { ReactNode } from "react";
|
|
|
|
import { ChatProvider, KnowledgeToFeedProvider } from "@/lib/context";
|
|
import { ChatsProvider } from "@/lib/context/ChatsProvider/chats-provider";
|
|
import { useSupabase } from "@/lib/context/SupabaseProvider";
|
|
import { redirectToLogin } from "@/lib/router/redirectToLogin";
|
|
|
|
interface LayoutProps {
|
|
children?: ReactNode;
|
|
}
|
|
|
|
const Layout = ({ children }: LayoutProps): JSX.Element => {
|
|
const { session } = useSupabase();
|
|
|
|
if (session === null) {
|
|
redirectToLogin();
|
|
}
|
|
|
|
return (
|
|
<KnowledgeToFeedProvider>
|
|
<ChatsProvider>
|
|
<ChatProvider>
|
|
<div className="relative h-full w-full flex justify-stretch items-stretch overflow-auto">
|
|
{children}
|
|
</div>
|
|
</ChatProvider>
|
|
</ChatsProvider>
|
|
</KnowledgeToFeedProvider>
|
|
);
|
|
};
|
|
|
|
export default Layout;
|