Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
"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,
});

const faviconHref = config?.faviconUrl
?? (resolvedTheme === "dark" ? "/icon-dark.svg"
: resolvedTheme === "light" ? "/icon-light.svg"
: "/icon.svg");

if (!config) return null;
Comment thread
GuillaumeLecomte1 marked this conversation as resolved.
Outdated

return (
<>
<Head>
{config.metaTitle && <title>{config.metaTitle}</title>}
{config.faviconUrl && <link rel="icon" href={config.faviconUrl} />}
<link rel="icon" href={faviconHref} key="app-favicon" />
</Head>

{config.customCss && (
Expand Down
5 changes: 5 additions & 0 deletions apps/dokploy/public/icon-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/dokploy/public/icon-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.