The main server, and probably only repository in this org.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
533 B

  1. import React from "react";
  2. import useLights from "../../Hooks/light";
  3. import Light from "../Light";
  4. import Loading from "../Loading";
  5. import {Card, CardBody, CardHeader} from "reactstrap";
  6. function LightPage() {
  7. const lights = useLights();
  8. if (lights === null) {
  9. return <Loading/>;
  10. }
  11. return (
  12. <Card className="mt-3">
  13. <CardHeader>
  14. Tilgjengelige lys
  15. </CardHeader>
  16. <CardBody>
  17. {lights.map(light => <Light {...light} />)}
  18. </CardBody>
  19. </Card>
  20. );
  21. }
  22. export default LightPage;