Wire production domain, CORS for tenant subdomains, celery volume mounts, and nginx reverse proxy configs for apex, API, identity, auth, and wildcard tenants. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
535 B
TypeScript
21 lines
535 B
TypeScript
"use client";
|
|
|
|
import { useEffect, useState } from "react";
|
|
import { applyTheme, loadTheme, type ThemeConfig } from "@/lib/theme";
|
|
|
|
/** بارگذاری و اعمال تم White-label در زمان mount. */
|
|
export function useTheme() {
|
|
const [theme, setTheme] = useState<ThemeConfig | null>(null);
|
|
const [loading, setLoading] = useState(true);
|
|
|
|
useEffect(() => {
|
|
loadTheme().then((t) => {
|
|
applyTheme(t);
|
|
setTheme(t);
|
|
setLoading(false);
|
|
});
|
|
}, []);
|
|
|
|
return { theme, loading };
|
|
}
|