Files
calendar/apps/web/lib/hooks/useIsThemeSupported.ts
T

15 lines
400 B
TypeScript

"use client";
import { usePathname } from "next/navigation";
const THEME_UNSUPPORTED_ROUTES = ["/auth/setup"];
export default function useIsThemeSupported(): boolean {
const pathname = usePathname();
// Check if current pathname matches any unsupported route
const isUnsupportedRoute = THEME_UNSUPPORTED_ROUTES.some((route) => pathname?.startsWith(route));
return !isUnsupportedRoute;
}