diff --git a/surfsense_web/app/dashboard/api-key/api-key-client.tsx b/surfsense_web/app/dashboard/api-key/api-key-client.tsx index ba6b972..97a36d8 100644 --- a/surfsense_web/app/dashboard/api-key/api-key-client.tsx +++ b/surfsense_web/app/dashboard/api-key/api-key-client.tsx @@ -1,13 +1,12 @@ "use client"; -import React from "react"; -import { useRouter } from "next/navigation"; -import { ArrowLeft } from "lucide-react"; -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; -import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; -import { motion, AnimatePresence } from "framer-motion"; import { IconCheck, IconCopy, IconKey } from "@tabler/icons-react"; +import { AnimatePresence, motion } from "framer-motion"; +import { ArrowLeft } from "lucide-react"; +import { useRouter } from "next/navigation"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; import { useApiKey } from "@/hooks/use-api-key"; diff --git a/surfsense_web/app/dashboard/api-key/client-wrapper.tsx b/surfsense_web/app/dashboard/api-key/client-wrapper.tsx index 63bd700..4397005 100644 --- a/surfsense_web/app/dashboard/api-key/client-wrapper.tsx +++ b/surfsense_web/app/dashboard/api-key/client-wrapper.tsx @@ -1,7 +1,7 @@ "use client"; -import React, { useEffect, useState } from "react"; import dynamic from "next/dynamic"; +import { useEffect, useState } from "react"; // Loading component with animation const LoadingComponent = () => ( diff --git a/surfsense_web/app/dashboard/api-key/page.tsx b/surfsense_web/app/dashboard/api-key/page.tsx index adfc6c3..26e0560 100644 --- a/surfsense_web/app/dashboard/api-key/page.tsx +++ b/surfsense_web/app/dashboard/api-key/page.tsx @@ -1,4 +1,5 @@ -import React from "react"; +"use client"; + import ClientWrapper from "./client-wrapper"; export default function ApiKeyPage() { diff --git a/surfsense_web/app/dashboard/layout.tsx b/surfsense_web/app/dashboard/layout.tsx index 18cdf4d..41a269d 100644 --- a/surfsense_web/app/dashboard/layout.tsx +++ b/surfsense_web/app/dashboard/layout.tsx @@ -1,10 +1,10 @@ "use client"; -import { useEffect, useState } from "react"; -import { useRouter } from "next/navigation"; -import { useLLMPreferences } from "@/hooks/use-llm-configs"; import { Loader2 } from "lucide-react"; +import { useRouter } from "next/navigation"; +import { useEffect, useState } from "react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { useLLMPreferences } from "@/hooks/use-llm-configs"; interface DashboardLayoutProps { children: React.ReactNode; diff --git a/surfsense_web/app/dashboard/page.tsx b/surfsense_web/app/dashboard/page.tsx index 3cab679..8e0e291 100644 --- a/surfsense_web/app/dashboard/page.tsx +++ b/surfsense_web/app/dashboard/page.tsx @@ -1,16 +1,16 @@ "use client"; -import React, { useEffect, useState } from "react"; +import { motion, type Variants } from "framer-motion"; +import { AlertCircle, Loader2, Plus, Search, Trash2 } from "lucide-react"; +import Image from "next/image"; import Link from "next/link"; -import { motion } from "framer-motion"; -import { Button } from "@/components/ui/button"; -import { Plus, Search, Trash2, AlertCircle, Loader2 } from "lucide-react"; -import { Tilt } from "@/components/ui/tilt"; -import { Spotlight } from "@/components/ui/spotlight"; +import { useRouter } from "next/navigation"; +import { useEffect, useState } from "react"; +import { toast } from "sonner"; import { Logo } from "@/components/Logo"; import { ThemeTogglerComponent } from "@/components/theme/theme-toggle"; import { UserDropdown } from "@/components/UserDropdown"; -import { toast } from "sonner"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { AlertDialog, AlertDialogAction, @@ -22,7 +22,7 @@ import { AlertDialogTitle, AlertDialogTrigger, } from "@/components/ui/alert-dialog"; -import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { Button } from "@/components/ui/button"; import { Card, CardContent, @@ -31,9 +31,10 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; +import { Spotlight } from "@/components/ui/spotlight"; +import { Tilt } from "@/components/ui/tilt"; import { useSearchSpaces } from "@/hooks/use-search-spaces"; import { apiClient } from "@/lib/api"; -import { useRouter } from "next/navigation"; interface User { id: string; @@ -131,7 +132,7 @@ const ErrorScreen = ({ message }: { message: string }) => { const DashboardPage = () => { // Animation variants - const containerVariants = { + const containerVariants: Variants = { hidden: { opacity: 0 }, visible: { opacity: 1, @@ -141,7 +142,7 @@ const DashboardPage = () => { }, }; - const itemVariants = { + const itemVariants: Variants = { hidden: { y: 20, opacity: 0 }, visible: { y: 0, @@ -154,7 +155,6 @@ const DashboardPage = () => { }, }; - const router = useRouter(); const { searchSpaces, loading, error, refreshSearchSpaces } = useSearchSpaces(); // User state management @@ -264,6 +264,7 @@ const DashboardPage = () => {