Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(web): show record-page skeleton instead of caps grid while loading

Minit Jain0ec32eb770a5
diff --git a/apps/web/app/(org)/dashboard/caps/record/loading.tsx b/apps/web/app/(org)/dashboard/caps/record/loading.tsx
new file mode 100644
index 000000000..5ca9c92f0
--- /dev/null
+++ b/apps/web/app/(org)/dashboard/caps/record/loading.tsx
@@ -0,0 +1,46 @@
+"use client";
+
+import { SkeletonPage } from "@cap/ui";
+
+export default function Loading() {
+ return (
+ <SkeletonPage
+ customSkeleton={(Skeleton) => (
+ <div className="flex flex-col flex-1 justify-center items-center w-full h-full px-5">
+ <div className="mx-auto w-full max-w-[560px] min-w-0 flex flex-col items-center">
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ className="!h-[20px] !w-[280px]"
+ />
+ <div className="flex gap-3 justify-center items-center mt-4">
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ className="!h-[40px] !w-[170px] !rounded-full"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ className="!h-[40px] !w-[170px] !rounded-full"
+ />
+ </div>
+ <div className="mt-8 w-full rounded-lg border border-gray-4 bg-gray-2 divide-y divide-gray-4">
+ {Array(7)
+ .fill(0)
+ .map((_, index) => (
+ <div key={index.toString()} className="p-3">
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ className="!h-[20px] !w-[220px]"
+ />
+ </div>
+ ))}
+ </div>
+ </div>
+ </div>
+ )}
+ />
+ );
+}