From 178834f3b27b8dc5e713089ad6341f2f343f0e41 Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Thu, 12 Feb 2026 23:48:58 +0100 Subject: [PATCH] fix: resolve type errors in ThemeProvider and ThemeToggle - Remove import from 'next-themes/dist/types' (no longer exported) - Use React.ComponentProps instead - Remove unsupported 'asChild' prop from TooltipTrigger - Remove unsupported 'side' prop from TooltipContent --- next-env.d.ts | 2 +- src/components/ThemeProvider.tsx | 6 ++++-- src/components/ThemeToggle.tsx | 16 +++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/next-env.d.ts b/next-env.d.ts index c4b7818..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/src/components/ThemeProvider.tsx b/src/components/ThemeProvider.tsx index a11e499..f2df7ce 100644 --- a/src/components/ThemeProvider.tsx +++ b/src/components/ThemeProvider.tsx @@ -1,8 +1,10 @@ "use client"; import { ThemeProvider as NextThemesProvider } from "next-themes"; -import { type ThemeProviderProps } from "next-themes/dist/types"; -export function ThemeProvider({ children, ...props }: ThemeProviderProps) { +export function ThemeProvider({ + children, + ...props +}: React.ComponentProps) { return {children}; } diff --git a/src/components/ThemeToggle.tsx b/src/components/ThemeToggle.tsx index 2d2fc03..af29d5e 100644 --- a/src/components/ThemeToggle.tsx +++ b/src/components/ThemeToggle.tsx @@ -46,16 +46,14 @@ export function ThemeToggle() { return ( - - + + - +

Theme: {themeName}