From f03a6fa5ce6bc3172d2dcb6be65182ba7b6bf766 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Fri, 30 Aug 2024 14:25:37 -0700 Subject: [PATCH 1/3] minor simplification to chat header --- web/src/components/chat_search/Header.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/components/chat_search/Header.tsx b/web/src/components/chat_search/Header.tsx index 1ed60a8dd36..77c1903162a 100644 --- a/web/src/components/chat_search/Header.tsx +++ b/web/src/components/chat_search/Header.tsx @@ -11,6 +11,7 @@ import { pageType } from "@/app/chat/sessionSidebar/types"; import { useRouter } from "next/navigation"; import { ChatBanner } from "@/app/chat/ChatBanner"; import LogoType from "../header/LogoType"; +import { SettingsContext } from "../settings/SettingsProvider"; export default function FunctionalHeader({ user, @@ -29,6 +30,7 @@ export default function FunctionalHeader({ setSharingModalVisible?: (value: SetStateAction) => void; toggleSidebar?: () => void; }) { + const settings = useContext(SettingsContext); useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { if (event.metaKey || event.ctrlKey) { @@ -64,7 +66,9 @@ export default function FunctionalHeader({ router.push(newChatUrl); }; return ( -
+
Date: Fri, 30 Aug 2024 14:26:26 -0700 Subject: [PATCH 2/3] squash --- web/src/components/chat_search/Header.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/src/components/chat_search/Header.tsx b/web/src/components/chat_search/Header.tsx index 77c1903162a..23e9039c6ca 100644 --- a/web/src/components/chat_search/Header.tsx +++ b/web/src/components/chat_search/Header.tsx @@ -11,7 +11,6 @@ import { pageType } from "@/app/chat/sessionSidebar/types"; import { useRouter } from "next/navigation"; import { ChatBanner } from "@/app/chat/ChatBanner"; import LogoType from "../header/LogoType"; -import { SettingsContext } from "../settings/SettingsProvider"; export default function FunctionalHeader({ user, @@ -30,7 +29,6 @@ export default function FunctionalHeader({ setSharingModalVisible?: (value: SetStateAction) => void; toggleSidebar?: () => void; }) { - const settings = useContext(SettingsContext); useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { if (event.metaKey || event.ctrlKey) { From e1076fda0d51aabff9657e5d72139b45ded9d684 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Fri, 30 Aug 2024 14:27:01 -0700 Subject: [PATCH 3/3] simplify --- web/src/components/chat_search/Header.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/src/components/chat_search/Header.tsx b/web/src/components/chat_search/Header.tsx index 23e9039c6ca..640393641d0 100644 --- a/web/src/components/chat_search/Header.tsx +++ b/web/src/components/chat_search/Header.tsx @@ -64,9 +64,7 @@ export default function FunctionalHeader({ router.push(newChatUrl); }; return ( -
+