feat: fix new chat button

This commit is contained in:
mamadoudicko 2023-06-27 11:09:47 +02:00
parent c402838f9b
commit 57760b11b5

View File

@ -38,29 +38,32 @@ export const ChatsList = (): JSX.Element => {
}} }}
className={cn("overflow-hidden")} className={cn("overflow-hidden")}
> >
<div className="min-w-fit max-h-screen overflow-auto scrollbar pt-20"> <div
<aside className="relative max-w-xs w-full h-screen"> style={{
<NewChatButton /> display: "flex",
<div className="flex flex-col gap-0"> flexDirection: "column",
{allChats.map((chat) => ( flex: 1,
<ChatsListItem height: "90vh",
key={chat.chat_id} }}
chat={chat} >
deleteChat={deleteChat} <NewChatButton />
/> <div style={{ flex: 1, overflow: "scroll", height: "100%" }}>
))} {allChats.map((chat) => (
</div> <ChatsListItem
</aside> key={chat.chat_id}
<div className="fixed bottom-0 left-0 p-4 py-1 absolute w-full bg-white"> chat={chat}
<MiniFooter /> deleteChat={deleteChat}
/>
))}
</div> </div>
<MiniFooter />
</div> </div>
</motion.div> </motion.div>
<button <button
onClick={() => { onClick={() => {
setOpen(!open); setOpen(!open);
}} }}
className="absolute left-full top-16 lg:top-0 text-3xl bg-black dark:bg-white text-white dark:text-black rounded-r-full p-3 pl-1" className="absolute left-full top-16 text-3xl bg-black dark:bg-white text-white dark:text-black rounded-r-full p-3 pl-1"
> >
<motion.div <motion.div
whileTap={{ scale: 0.9 }} whileTap={{ scale: 0.9 }}