Converted variables to be runtime.

This commit is contained in:
Mike Cao committed 2025-07-24 22:41:23 -07:00
1 parent b6862de2be
commit 5b6292dd11
11 files changed
+46 -36

No files matched your search

+2 -2
View File
@@ -9,11 +9,11 @@ function getHostName(url: string) {
export function Favicon({ domain, ...props }) {
const config = useConfig();
if (process.env.privateMode) {
if (config?.privateMode) {
return null;
}
const url = config?.faviconURL || FAVICON_URL;
const url = config?.faviconUrl || FAVICON_URL;
const hostName = domain ? getHostName(domain) : null;
const domainName = GROUPED_DOMAINS[hostName]?.domain || hostName;
const src = hostName ? url.replace(/\{\{\s*domain\s*}}/, domainName) : null;