From 094edfcfe6c5af12f432841935816aee9fe87533 Mon Sep 17 00:00:00 2001 From: shadcn Date: Sun, 18 Jan 2026 12:11:20 +0400 Subject: [PATCH] fix: charts --- apps/v4/app/(app)/charts/layout.tsx | 1 - .../view/[style]/[name]/component-preview.tsx | 13 ++----------- apps/v4/components/chart-iframe.tsx | 7 +------ apps/v4/components/chart-toolbar.tsx | 2 +- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/apps/v4/app/(app)/charts/layout.tsx b/apps/v4/app/(app)/charts/layout.tsx index 1e76367eb9..3c5746b7f0 100644 --- a/apps/v4/app/(app)/charts/layout.tsx +++ b/apps/v4/app/(app)/charts/layout.tsx @@ -63,7 +63,6 @@ export default function ChartsLayout({ -
diff --git a/apps/v4/app/(view)/view/[style]/[name]/component-preview.tsx b/apps/v4/app/(view)/view/[style]/[name]/component-preview.tsx index 4e92c87812..e841d101ea 100644 --- a/apps/v4/app/(view)/view/[style]/[name]/component-preview.tsx +++ b/apps/v4/app/(view)/view/[style]/[name]/component-preview.tsx @@ -1,22 +1,13 @@ -"use client" - -import { useSearchParams } from "next/navigation" - import { cn } from "@/lib/utils" export function ComponentPreview({ children }: { children: React.ReactNode }) { - const searchParams = useSearchParams() - const theme = searchParams.get("theme") ?? "default" - return (
-
{children}
+ {children}
) } diff --git a/apps/v4/components/chart-iframe.tsx b/apps/v4/components/chart-iframe.tsx index de62632bfb..afab812c6f 100644 --- a/apps/v4/components/chart-iframe.tsx +++ b/apps/v4/components/chart-iframe.tsx @@ -3,7 +3,6 @@ import * as React from "react" import { cn } from "@/lib/utils" -import { useThemeConfig } from "@/components/active-theme" export function ChartIframe({ src, @@ -15,14 +14,10 @@ export function ChartIframe({ title: string }) { const [loaded, setLoaded] = React.useState(false) - const { activeTheme } = useThemeConfig() - - // Append theme as query param so iframe can apply it. - const iframeSrc = `${src}?theme=${activeTheme}` return (