update 一层温度
This commit is contained in:
26
src/components/Common/TemperatureTop/index.jsx
Normal file
26
src/components/Common/TemperatureTop/index.jsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import BlueRect from "../BlueRect";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
function TemperatureTop(props) {
|
||||
const tempTop = useSelector((state) => state.temperature.top);
|
||||
|
||||
return (
|
||||
<div
|
||||
className="temperature-top"
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: "0",
|
||||
left: "0",
|
||||
width: "100%",
|
||||
height: "95vh",
|
||||
background: "#ccc3",
|
||||
}}
|
||||
>
|
||||
{Object.keys(tempTop).map((d) => (
|
||||
<BlueRect title={d} value={tempTop[d]} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default TemperatureTop;
|
||||
Reference in New Issue
Block a user