HomeAssistant update
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useHomeAssistantStore } from "@/store/homeAssistant";
|
import { useHomeAssistantStore } from "@/store/homeAssistant";
|
||||||
|
|
||||||
|
import style from "./style.module.css";
|
||||||
|
|
||||||
export default function Timetable() {
|
export default function Timetable() {
|
||||||
const fetchHomeAssistantData = useHomeAssistantStore(
|
const fetchHomeAssistantData = useHomeAssistantStore(
|
||||||
(state) => state.fetch,
|
(state) => state.fetch,
|
||||||
@@ -21,8 +23,17 @@ export default function Timetable() {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>Tent</h1>
|
<h1>Tent</h1>
|
||||||
<p>Temperature: {tentTemperature}°C</p>
|
<div className={style.cardContainer}>
|
||||||
<p>Humidity: {tentHumidity}%</p>
|
<div className={style.card}>
|
||||||
|
<h4>Temperature</h4>
|
||||||
|
<p>{tentTemperature}°C</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={style.card}>
|
||||||
|
<h4>Humidity</h4>
|
||||||
|
<p>{tentHumidity}%</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
18
src/components/HomeAssistant/style.module.css
Normal file
18
src/components/HomeAssistant/style.module.css
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
.cardContainer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
height: 150px;
|
||||||
|
width: 150px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
border: 1px solid rgba(220, 220, 220, 0.4);
|
||||||
|
box-shadow: 5px 5px 7px rgba(220, 220, 220, 0.5);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user