diff --git a/frontend/src/components/home/Home.tsx b/frontend/src/components/home/Home.tsx index 9ebb05524..d7827f11f 100644 --- a/frontend/src/components/home/Home.tsx +++ b/frontend/src/components/home/Home.tsx @@ -1,14 +1,14 @@ -import { ContainerStatus } from "@monitor/types"; import { Component, For, Show } from "solid-js"; import { useAppState } from "../../state/StateProvider"; import { useUser } from "../../state/UserProvider"; -import { deploymentStatusClass, serverStatusClass } from "../../util/helpers"; +import { deploymentStatusClass, inPx, serverStatusClass } from "../../util/helpers"; import Circle from "../util/Circle"; import Flex from "../util/layout/Flex"; import Grid from "../util/layout/Grid"; -import HoverMenu from "../util/menu/HoverMenu"; import s from "./home.module.scss"; +const cardWidth = 300; // in px + const Home: Component<{}> = (p) => { const { username, permissions } = useUser(); const { deployments, builds, servers, selected } = useAppState(); @@ -37,33 +37,33 @@ const Home: Component<{}> = (p) => { ); return ( - + 0} > - +

my deployments

{(id) => ( )} @@ -72,14 +72,21 @@ const Home: Component<{}> = (p) => {
0}> - +

my servers

{(id) => ( @@ -123,7 +137,7 @@ const Home: Component<{}> = (p) => {
you are using a view only account.
-
+
); }; diff --git a/frontend/src/components/home/home.module.scss b/frontend/src/components/home/home.module.scss index e90c63512..7ce46549a 100644 --- a/frontend/src/components/home/home.module.scss +++ b/frontend/src/components/home/home.module.scss @@ -4,3 +4,10 @@ grid-area: content; padding: 1rem; } + +.Container { + width: fit-content; + height: fit-content; + flex-wrap: wrap; + max-width: 100%; +} diff --git a/frontend/src/state/hooks.ts b/frontend/src/state/hooks.ts index e0ce97825..ccd64a0bb 100644 --- a/frontend/src/state/hooks.ts +++ b/frontend/src/state/hooks.ts @@ -141,7 +141,7 @@ export function useDeployments() { const deployment = deployments.get(id)!; return deployment.status === "not deployed" || deployment.status === "unknown" - ? undefined + ? deployment.status : (deployments.get(id)!.status as ContainerStatus).Status.toLowerCase(); } return {