From 71f81cae20046c7e51a3ffa49affddadb562bfbf Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Tue, 23 Jul 2024 01:05:22 -0700 Subject: [PATCH 1/2] history dropdown --- apps/web/app/(dash)/header/header.tsx | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/apps/web/app/(dash)/header/header.tsx b/apps/web/app/(dash)/header/header.tsx index b9d400c9..686d8cac 100644 --- a/apps/web/app/(dash)/header/header.tsx +++ b/apps/web/app/(dash)/header/header.tsx @@ -6,6 +6,7 @@ import Logo from "../../../public/logo.svg"; import { getChatHistory } from "../../actions/fetchers"; import NewChatButton from "./newChatButton"; import AutoBreadCrumbs from "./autoBreadCrumbs"; +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@repo/ui/shadcn/dropdown-menu"; async function Header() { const chatThreads = await getChatHistory(); @@ -32,26 +33,23 @@ async function Header() {
-
- - -
-
- {chatThreads.data.map((thread) => ( + + History + + {chatThreads.data.map((thread) => ( + {thread.firstMessage} - ))} -
-
-
+ + ))} + +
From 304913a3b1f56a7a7392f5720029513e75795127 Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Tue, 23 Jul 2024 08:40:15 -0700 Subject: [PATCH 2/2] a11y support --- apps/web/app/(dash)/header/header.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/web/app/(dash)/header/header.tsx b/apps/web/app/(dash)/header/header.tsx index 686d8cac..9c225bc6 100644 --- a/apps/web/app/(dash)/header/header.tsx +++ b/apps/web/app/(dash)/header/header.tsx @@ -7,6 +7,7 @@ import { getChatHistory } from "../../actions/fetchers"; import NewChatButton from "./newChatButton"; import AutoBreadCrumbs from "./autoBreadCrumbs"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@repo/ui/shadcn/dropdown-menu"; +import { CaretDownIcon } from "@radix-ui/react-icons"; async function Header() { const chatThreads = await getChatHistory(); @@ -34,7 +35,10 @@ async function Header() { - History + + History + + {chatThreads.data.map((thread) => (