diff --git a/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx b/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx index a1a3275618..05e0b517a1 100644 --- a/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx +++ b/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx @@ -1,24 +1,32 @@ "use client"; import Head from "next/head"; +import { useTheme } from "next-themes"; import { api } from "@/utils/api"; export function WhitelabelingProvider() { + const { resolvedTheme } = useTheme(); const { data: config } = api.whitelabeling.getPublic.useQuery(undefined, { staleTime: 5 * 60 * 1000, refetchOnWindowFocus: false, }); - if (!config) return null; + const faviconHref = + config?.faviconUrl ?? + (resolvedTheme === "dark" + ? "/icon-dark.svg" + : resolvedTheme === "light" + ? "/icon-light.svg" + : "/icon.svg"); return ( <> - {config.metaTitle && {config.metaTitle}} - {config.faviconUrl && } + {config?.metaTitle && {config.metaTitle}} + - {config.customCss && ( + {config?.customCss && (