Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
chennisden committed Jun 10, 2024
1 parent ffd51f3 commit 2e5a7d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 6 additions & 2 deletions frontend/src/pages/RobotDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useAlertQueue } from "hooks/alerts";
import { api, Bom } from "hooks/api";
import { useAuthentication } from "hooks/auth";
import { useEffect, useState } from "react";
Expand All @@ -13,7 +14,6 @@ import {
} from "react-bootstrap";
import Markdown from "react-markdown";
import { Link, useNavigate, useParams } from "react-router-dom";
import { useAlertQueue } from "hooks/alerts";
import { isFulfilled } from "utils/isfullfiled";

interface RobotDetailsResponse {
Expand Down Expand Up @@ -64,7 +64,11 @@ const RobotDetails = () => {
quantity: part.quantity,
};
});
setParts((await Promise.allSettled(parts)).filter(isFulfilled).map((result) => result.value as ExtendedBom));
setParts(
(await Promise.allSettled(parts))
.filter(isFulfilled)
.map((result) => result.value as ExtendedBom),
);
} catch (err) {
if (err instanceof Error) {
setError(err.message);
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/pages/Robots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ const Robots = () => {
return [id, await auth_api.getUserById(id)];
}),
);
setIdMap(new Map(idMap.filter(isFulfilled).map((result) => result.value as [string, string])));
setIdMap(
new Map(
idMap
.filter(isFulfilled)
.map((result) => result.value as [string, string]),
),
);
} catch (err) {
if (err instanceof Error) {
setError(err.message);
Expand Down

0 comments on commit 2e5a7d2

Please sign in to comment.