Skip to content

Commit

Permalink
chore: flash node skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
barrenechea committed Jun 8, 2024
1 parent 1dd419d commit 0ca3047
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/components/skeletons/flash-node.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import TabView from "../TabView";

export default function FlashNodeSkeleton() {
return (
<TabView>
<div className="flex flex-col">
<div className="mb-10 h-7 w-96 animate-pulse bg-neutral-200 dark:bg-neutral-700"></div>
<div className="space-y-5">
<div className="flex items-center gap-4">
<div className="h-6 w-36 animate-pulse bg-neutral-200 dark:bg-neutral-700"></div>
<div className="flex gap-2">
{Array.from({ length: 4 }).map((_, index) => (
<div
key={index}
className="h-9 w-24 animate-pulse rounded-md bg-neutral-200 dark:bg-neutral-700"
></div>
))}
</div>
</div>
<div className="h-10 w-full animate-pulse bg-neutral-200 dark:bg-neutral-700"></div>
<div className="h-10 w-full animate-pulse bg-neutral-200 dark:bg-neutral-700"></div>
</div>
<div className="mb-4 mt-5 flex items-center gap-4">
<div className="h-9 w-24 animate-pulse rounded-full bg-neutral-200 dark:bg-neutral-700"></div>
<div className="h-6 w-28 animate-pulse bg-neutral-200 dark:bg-neutral-700"></div>
</div>
</div>
</TabView>
);
}
2 changes: 2 additions & 0 deletions src/routes/_tabLayout/flash-node.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Cpu } from "lucide-react";
import { useEffect, useMemo, useRef, useState } from "react";

import ConfirmationModal from "@/components/ConfirmationModal";
import FlashNodeSkeleton from "@/components/skeletons/flash-node";
import TabView from "@/components/TabView";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
Expand All @@ -14,6 +15,7 @@ import { useAboutTabData } from "@/lib/api/get";

export const Route = createLazyFileRoute("/_tabLayout/flash-node")({
component: FlashNode,
pendingComponent: FlashNodeSkeleton,
});

const nodeOptions = [
Expand Down

0 comments on commit 0ca3047

Please sign in to comment.