diff --git a/surfsense_web/app/layout.tsx b/surfsense_web/app/layout.tsx index a7e95bacc..23ba616cc 100644 --- a/surfsense_web/app/layout.tsx +++ b/surfsense_web/app/layout.tsx @@ -102,9 +102,7 @@ export default function RootLayout({ defaultTheme="light" > - -
{children}
-
+ {children}
diff --git a/surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx b/surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx index 848028e1f..c6ad5f1e3 100644 --- a/surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx +++ b/surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx @@ -1,9 +1,9 @@ "use client"; import { useAtom, useAtomValue } from "jotai"; -import { AlertCircle, Pencil, Play, Podcast, RefreshCw, Sparkles } from "lucide-react"; +import { AlertCircle, Play, RefreshCw, Sparkles } from "lucide-react"; import { motion } from "motion/react"; -import { useCallback, useContext, useTransition } from "react"; +import { useCallback } from "react"; import { cn } from "@/lib/utils"; import { activeChatAtom } from "@/stores/chat/active-chat.atom"; import { chatUIAtom } from "@/stores/chat/chat-ui.atom"; @@ -79,16 +79,9 @@ export function ChatPanelView(props: ChatPanelViewProps) { animate={{ opacity: 1 }} transition={{ duration: 0.3 }} > -
{ - if (e.key === "Enter") { - e.preventDefault(); - handleGeneratePost(); - } - }} className={cn( "relative w-full rounded-2xl p-4 transition-all duration-300 cursor-pointer group overflow-hidden", "border-2", @@ -154,7 +147,7 @@ export function ChatPanelView(props: ChatPanelViewProps) {
- + ) : ( diff --git a/surfsense_web/components/homepage/navbar.tsx b/surfsense_web/components/homepage/navbar.tsx index 9b7f31055..2b7fe9fd9 100644 --- a/surfsense_web/components/homepage/navbar.tsx +++ b/surfsense_web/components/homepage/navbar.tsx @@ -19,21 +19,15 @@ export const Navbar = () => { ]; useEffect(() => { - const handleScroll = (e: Event) => { - const target = e.target as HTMLElement; - setIsScrolled(target.scrollTop > 20); + if (typeof window === "undefined") return; + + const handleScroll = () => { + setIsScrolled(window.scrollY > 20); }; - // Find the scrollable container (the div with overflow-auto in root layout) - const scrollContainer = document.querySelector(".h-\\[100dvh\\].w-\\[100vw\\].overflow-auto"); - - if (scrollContainer) { - // Check initial scroll position - setIsScrolled(scrollContainer.scrollTop > 20); - - scrollContainer.addEventListener("scroll", handleScroll); - return () => scrollContainer.removeEventListener("scroll", handleScroll); - } + handleScroll(); + window.addEventListener("scroll", handleScroll); + return () => window.removeEventListener("scroll", handleScroll); }, []); return ( diff --git a/surfsense_web/components/onboard/add-provider-step.tsx b/surfsense_web/components/onboard/add-provider-step.tsx index d3d335b17..1086d7dc0 100644 --- a/surfsense_web/components/onboard/add-provider-step.tsx +++ b/surfsense_web/components/onboard/add-provider-step.tsx @@ -28,7 +28,7 @@ import { SelectValue, } from "@/components/ui/select"; import { LANGUAGES } from "@/contracts/enums/languages"; -import { getModelsByProvider, LLM_MODELS } from "@/contracts/enums/llm-models"; +import { getModelsByProvider } from "@/contracts/enums/llm-models"; import { LLM_PROVIDERS } from "@/contracts/enums/llm-providers"; import { type CreateLLMConfig, useLLMConfigs } from "@/hooks/use-llm-configs"; import { cn } from "@/lib/utils"; @@ -255,7 +255,6 @@ export function AddProviderStep({