Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
is2ac2 committed Jun 10, 2024
1 parent a389181 commit 3952f7d
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 50 deletions.
22 changes: 14 additions & 8 deletions frontend/src/pages/PartDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
ButtonGroup,
Carousel,
Col,
Container,
Modal,
Row,
Spinner,
Container,
} from "react-bootstrap";
import Markdown from "react-markdown";
import { useNavigate, useParams } from "react-router-dom";
Expand Down Expand Up @@ -64,13 +64,19 @@ const PartDetails = () => {
}, [error]);

if (!part) {
return <Container fluid className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>;
return (
<Container
fluid
className="d-flex justify-content-center align-items-center"
style={{ height: "100vh" }}
>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>
);
}

const response: PartDetailsResponse = {
Expand Down
29 changes: 21 additions & 8 deletions frontend/src/pages/Parts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ import { useAlertQueue } from "hooks/alerts";
import { api, Part } from "hooks/api";
import { useAuthentication } from "hooks/auth";
import { useEffect, useState } from "react";
import { Breadcrumb, Card, Col, Row, Spinner, Container } from "react-bootstrap";
import {
Breadcrumb,
Card,
Col,
Container,
Row,
Spinner,
} from "react-bootstrap";
import { useNavigate } from "react-router-dom";
import { isFulfilled } from "utils/isfullfiled";

Expand Down Expand Up @@ -59,13 +66,19 @@ const Parts = () => {
}, [error]);

if (!partsData) {
return <Container fluid className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>;
return (
<Container
fluid
className="d-flex justify-content-center align-items-center"
style={{ height: "100vh" }}
>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>
);
}

return (
Expand Down
22 changes: 14 additions & 8 deletions frontend/src/pages/RobotDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
ButtonGroup,
Carousel,
Col,
Container,
Modal,
Row,
Spinner,
Container,
} from "react-bootstrap";
import Markdown from "react-markdown";
import { Link, useNavigate, useParams } from "react-router-dom";
Expand Down Expand Up @@ -98,13 +98,19 @@ const RobotDetails = () => {
}, [error]);

if (!robot) {
return <Container fluid className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>;
return (
<Container
fluid
className="d-flex justify-content-center align-items-center"
style={{ height: "100vh" }}
>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>
);
}
const response: RobotDetailsResponse = {
name: robot?.name,
Expand Down
30 changes: 20 additions & 10 deletions frontend/src/pages/Robots.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { api, Robot } from "hooks/api";
import { useAuthentication } from "hooks/auth";
import { useEffect, useState } from "react";
import { Breadcrumb, Card, Col, Row, Spinner, Container } from "react-bootstrap";
import {
Breadcrumb,
Card,
Col,
Container,
Row,
Spinner,
} from "react-bootstrap";
import { useNavigate } from "react-router-dom";
import { isFulfilled } from "utils/isfullfiled";

Expand Down Expand Up @@ -52,15 +59,18 @@ const Robots = () => {
}, [error, navigate]);

if (!robotsData) {
return(
<Container fluid className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>

return (
<Container
fluid
className="d-flex justify-content-center align-items-center"
style={{ height: "100vh" }}
>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>
);
}

Expand Down
29 changes: 21 additions & 8 deletions frontend/src/pages/YourParts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { api, Part } from "hooks/api";
import { useAuthentication } from "hooks/auth";
import { useEffect, useState } from "react";
import { Breadcrumb, Card, Col, Row, Spinner, Container } from "react-bootstrap";
import {
Breadcrumb,
Card,
Col,
Container,
Row,
Spinner,
} from "react-bootstrap";
import { useNavigate } from "react-router-dom";

const YourParts = () => {
Expand Down Expand Up @@ -34,13 +41,19 @@ const YourParts = () => {
}, [error, navigate]);

if (!partsData) {
return <Container fluid className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>;
return (
<Container
fluid
className="d-flex justify-content-center align-items-center"
style={{ height: "100vh" }}
>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>
);
}

return (
Expand Down
29 changes: 21 additions & 8 deletions frontend/src/pages/YourRobots.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { api, Robot } from "hooks/api";
import { useAuthentication } from "hooks/auth";
import { useEffect, useState } from "react";
import { Breadcrumb, Card, Col, Row, Spinner, Container } from "react-bootstrap";
import {
Breadcrumb,
Card,
Col,
Container,
Row,
Spinner,
} from "react-bootstrap";
import { useNavigate } from "react-router-dom";

const YourRobots = () => {
Expand Down Expand Up @@ -35,13 +42,19 @@ const YourRobots = () => {
}, [error, navigate]);

if (!robotsData) {
return <Container fluid className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>;
return (
<Container
fluid
className="d-flex justify-content-center align-items-center"
style={{ height: "100vh" }}
>
<Row className="w-100">
<Col className="d-flex justify-content-center align-items-center">
<Spinner animation="border" />
</Col>
</Row>
</Container>
);
}

return (
Expand Down

0 comments on commit 3952f7d

Please sign in to comment.