Files
web/apps/scandic-web/components/ThemeUpdater/index.tsx
Erik Tiekstra 7fcd5833bd feat(BOOK-414): Added hotel branding themes to hotelpages
Approved-by: Matilda Landström
2025-10-02 12:34:38 +00:00

19 lines
360 B
TypeScript

"use client"
import { useEffect } from "react"
import { type Theme, THEMES } from "@/utils/theme/types"
interface ThemeUpdaterProps {
theme: Theme
}
export default function ThemeUpdater({ theme }: ThemeUpdaterProps) {
useEffect(() => {
document.body.classList.remove(...THEMES)
document.body.classList.add(theme)
}, [theme])
return null
}