TorbatYar/frontend/components/ThemeProvider.tsx
Mortezakoohjani 800b0ba2c5 Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing.
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>
2026-07-21 21:43:33 +03:30

19 lines
518 B
TypeScript

"use client";
import type { ReactNode } from "react";
import { useTheme } from "@/hooks/useTheme";
export function ThemeProvider({ children }: { children: ReactNode }) {
const { loading } = useTheme();
if (loading) {
return (
<div className="flex min-h-screen items-center justify-center bg-[var(--color-primary-soft)]">
<div className="h-10 w-10 animate-spin rounded-full border-4 border-primary border-t-transparent" />
</div>
);
}
return <>{children}</>;
}