Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 2x 2x 2x 2x 2x 2x 2x 3x 3x 2x | import useHeating from '@/hooks/useHeating'; import styles from './heating.module.css'; import RenderManager from '@/components/RenderManager'; import Tooltip from '@/components/Tooltip'; import { FaTemperatureHigh } from 'react-icons/fa'; import { useIntl } from 'react-intl'; /** * @description - Shows the current temperature of the house and the outside temperature * @returns {JSX.Element} - News component */ const Heating = () => { const { data, error, loading } = useHeating(); const { formatMessage: f } = useIntl(); return ( <Tooltip> <Tooltip.Trigger> <div className={styles.container} data-testid="heating"> <FaTemperatureHigh className={styles.icon} /> <RenderManager error={error} loading={loading} errorTitle={f({ id: 'heating.error' })} loadingTitle={f({ id: 'heating.loading' })} > <div>{data.outsideTemp ?? 0}</div>|<div>{data.zoneMeasuredTemp ?? 0}</div> </RenderManager> </div> </Tooltip.Trigger> <Tooltip.Content> {f( { id: 'heating.tooltip' }, { outsideTemp: data.outsideTemp, zoneMeasuredTemp: data.zoneMeasuredTemp } )} </Tooltip.Content> </Tooltip> ); }; export default Heating; |