From 6969b9c2bc124975bec45dd43fc5ee66f7f654a0 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 22 May 2026 18:31:28 +0200 Subject: [PATCH] chore(deps): drop next-themes; remove ThemeProvider + theme toggle UI --- package-lock.json | 11 --------- package.json | 1 - src/app/globals.css | 36 ----------------------------- src/app/providers.tsx | 13 ++++------- src/components/layouts/role-nav.tsx | 20 +--------------- tailwind.config.ts | 1 - 6 files changed, 6 insertions(+), 76 deletions(-) diff --git a/package-lock.json b/package-lock.json index acf6857..c585cbd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,7 +61,6 @@ "motion": "^11.15.0", "next": "^15.1.0", "next-auth": "^5.0.0-beta.25", - "next-themes": "^0.4.6", "nodemailer": "^7.0.7", "openai": "^6.16.0", "papaparse": "^5.4.1", @@ -12143,16 +12142,6 @@ } } }, - "node_modules/next-themes": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz", - "integrity": "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==", - "license": "MIT", - "peerDependencies": { - "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" - } - }, "node_modules/next/node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", diff --git a/package.json b/package.json index 046c3e1..98d69f7 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,6 @@ "motion": "^11.15.0", "next": "^15.1.0", "next-auth": "^5.0.0-beta.25", - "next-themes": "^0.4.6", "nodemailer": "^7.0.7", "openai": "^6.16.0", "papaparse": "^5.4.1", diff --git a/src/app/globals.css b/src/app/globals.css index 4259730..0166a55 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -218,35 +218,6 @@ --info: 194 25% 44%; } - .dark { - --background: 220 15% 8%; - --foreground: 0 0% 98%; - - --card: 220 15% 10%; - --card-foreground: 0 0% 98%; - - --popover: 220 15% 10%; - --popover-foreground: 0 0% 98%; - - --primary: 354 90% 50%; - --primary-foreground: 0 0% 100%; - - --secondary: 220 15% 18%; - --secondary-foreground: 0 0% 98%; - - --muted: 220 15% 18%; - --muted-foreground: 0 0% 64%; - - --accent: 194 20% 18%; - --accent-foreground: 0 0% 98%; - - --destructive: 0 84% 55%; - --destructive-foreground: 0 0% 100%; - - --border: 220 15% 22%; - --input: 220 15% 22%; - --ring: 220 10% 50%; - } } @layer base { @@ -345,13 +316,6 @@ div[class*="recharts-tooltip"] { opacity: 1 !important; } -.dark div[class*="tremor"][class*="tooltip"], -.dark .recharts-tooltip-wrapper .recharts-default-tooltip, -.dark div[class*="recharts-tooltip"] { - background-color: hsl(var(--card)) !important; - border-color: hsl(var(--border)) !important; -} - /* Tremor/Recharts tooltip color indicator icons — fix rendering */ .recharts-tooltip-wrapper svg.recharts-surface { display: inline-block !important; diff --git a/src/app/providers.tsx b/src/app/providers.tsx index 36461ff..de62bad 100644 --- a/src/app/providers.tsx +++ b/src/app/providers.tsx @@ -2,7 +2,6 @@ import { useState } from 'react' import { SessionProvider } from 'next-auth/react' -import { ThemeProvider } from 'next-themes' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { httpBatchLink } from '@trpc/client' import superjson from 'superjson' @@ -78,12 +77,10 @@ export function Providers({ children }: { children: React.ReactNode }) { ) return ( - - - - {children} - - - + + + {children} + + ) } diff --git a/src/components/layouts/role-nav.tsx b/src/components/layouts/role-nav.tsx index 3e1c7ff..69165d0 100644 --- a/src/components/layouts/role-nav.tsx +++ b/src/components/layouts/role-nav.tsx @@ -19,11 +19,10 @@ import { import type { Route } from 'next' import type { LucideIcon } from 'lucide-react' import { - LogOut, Menu, Moon, Settings, Sun, User, X, + LogOut, Menu, Settings, User, X, ArrowRightLeft, ExternalLink as ExternalLinkIcon, HelpCircle, Mail, } from 'lucide-react' -import { useTheme } from 'next-themes' import { Logo } from '@/components/shared/logo' import { NotificationBell } from '@/components/shared/notification-bell' import { useRoleSwitcher, RoleSwitcherPill } from './role-switcher' @@ -69,9 +68,6 @@ export function RoleNav({ navigation, roleName, user, basePath, statusBadge, edi }) const endImpersonation = trpc.user.endImpersonation.useMutation() const logNavClick = trpc.learningResource.logNavClick.useMutation() - const { theme, setTheme } = useTheme() - const [mounted, setMounted] = useState(false) - useEffect(() => setMounted(true), []) const handleSignOut = async () => { if (isImpersonating) { @@ -172,20 +168,6 @@ export function RoleNav({ navigation, roleName, user, basePath, statusBadge, edi )} - {mounted && ( - - )} diff --git a/tailwind.config.ts b/tailwind.config.ts index 60b8115..bcf66e4 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,7 +1,6 @@ import type { Config } from 'tailwindcss' const config: Config = { - darkMode: 'class', content: [ './src/pages/**/*.{js,ts,jsx,tsx,mdx}', './src/components/**/*.{js,ts,jsx,tsx,mdx}',