From 95c1c81b3b0c7cea637ae06bf100b68be00cc003 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Fri, 10 Mar 2023 00:27:59 +0530 Subject: [PATCH] Fix ColorPicker not showing up and Auto theme not working (#7626) --- apps/web/components/Embed.tsx | 11 ++++++++++- packages/lib/hooks/useTheme.tsx | 4 +--- .../ui/components/form/color-picker/colorpicker.tsx | 8 +++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/apps/web/components/Embed.tsx b/apps/web/components/Embed.tsx index 462a8cb7da..c8e127b296 100644 --- a/apps/web/components/Embed.tsx +++ b/apps/web/components/Embed.tsx @@ -669,8 +669,11 @@ const EmbedTypeCodeAndPreviewDialogContent = ({ embedUrl: string; }) => { const { t } = useLocale(); + const router = useRouter(); const iframeRef = useRef(null); + const dialogContentRef = useRef(null); + const s = (href: string) => { const searchParams = new URLSearchParams(router.asPath.split("?")[1] || ""); const [a, b] = href.split("="); @@ -809,7 +812,7 @@ const EmbedTypeCodeAndPreviewDialogContent = ({ ]; return ( - +