quivr/frontend/app/chat/layout.tsx
Aditya Nandan 57f9ef6170
Sticky - chat list, navbar, chat input (#295)
* feat: sticky navbar and sticky chatlist

* fix: remove unnecessary top padding

* style(chat): sticky chat input

* style(footer): increase vertical padding

* style(chat): sticky new chat button

* fix(chat): minor fixes

* fix(chat): center ChatMessages

* fix(chat): screen height chatlist
2023-06-11 10:44:23 +02:00

24 lines
522 B
TypeScript

"use client";
import { redirect } from "next/navigation";
import { FC, ReactNode } from "react";
import { useSupabase } from "../supabase-provider";
import { ChatsList } from "./components";
interface LayoutProps {
children?: ReactNode;
}
const Layout: FC<LayoutProps> = ({ children }) => {
const { session } = useSupabase();
if (!session) redirect("/login");
return (
<div className="relative h-full w-full flex items-start">
<ChatsList />
{children}
</div>
);
};
export default Layout;