import { FC } from "react"; import { GetConfigurationValue } from "../../../../../api"; import { RoomWidgetViewNight } from "./../../../views/widgets/rooms/RoomWidgetViewNight"; import { RoomWidgetView } from "./../../../views/widgets/rooms/RoomWidgetView"; export const HotelMorning: FC<{}> = () => { const backgroundColor = GetConfigurationValue('hotelview')['images']['background.colour']; const now = new Date(); const hour = now.getHours(); const minutes = now.getMinutes(); const backgroundStyle = backgroundColor && backgroundColor ? { background: backgroundColor } : {}; const renderDefaultView = () => (
); const renderView = (elements: React.ReactNode) => (
{elements}
); return ( <> {hour === 6 && minutes <= 30 && renderView( <>
, )} {hour === 6 && minutes >= 30 && renderView( <>
, )} {hour === 7 && minutes <= 30 && renderView( <>
, )} {hour === 7 && minutes >= 30 && renderView( <>
, )} {hour === 8 && minutes <= 30 && renderView( <>
, )} {hour === 8 && minutes >= 30 && renderView( <>
, )} {hour === 9 && minutes <= 30 && renderView( <>
, )} {hour === 9 && minutes >= 30 && renderView( <>
, )} {hour === 10 && minutes <= 30 && renderView( <>
, )} ); };