Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: add group card placeholder
Marc Seitze13008c51433
diff --git a/components/datarooms/groups/group-card-placeholder.tsx b/components/datarooms/groups/group-card-placeholder.tsxnew file mode 100644index 00000000..a7688222--- /dev/null+++ b/components/datarooms/groups/group-card-placeholder.tsx@@ -0,0 +1,26 @@+import {+ Card,+ CardContent,+ CardFooter,+ CardHeader,+} from "@/components/ui/card";+import { Skeleton } from "@/components/ui/skeleton";++export function GroupCardPlaceholder() {+ return (+ <Card className="w-full">+ <CardHeader className="space-y-2">+ <Skeleton className="h-6 w-1/2" />+ <Skeleton className="h-4 w-3/4" />+ </CardHeader>+ <CardContent>+ <Skeleton className="h-4 w-full" />+ <Skeleton className="mt-2 h-4 w-4/5" />+ </CardContent>+ <CardFooter className="flex justify-between">+ <Skeleton className="h-8 w-20" />+ <Skeleton className="h-8 w-8 rounded-full" />+ </CardFooter>+ </Card>+ );+}diff --git a/pages/datarooms/[id]/groups/index.tsx b/pages/datarooms/[id]/groups/index.tsxindex dc4d636f..f45f0495 100644--- a/pages/datarooms/[id]/groups/index.tsx+++ b/pages/datarooms/[id]/groups/index.tsx@@ -4,14 +4,13 @@ import { useState } from "react";import { UsersIcon } from "lucide-react";-import { AddViewerModal } from "@/components/datarooms/add-viewer-modal";import { DataroomHeader } from "@/components/datarooms/dataroom-header";import { DataroomNavigation } from "@/components/datarooms/dataroom-navigation";import { AddGroupModal } from "@/components/datarooms/groups/add-group-modal";import GroupCard from "@/components/datarooms/groups/group-card";+import { GroupCardPlaceholder } from "@/components/datarooms/groups/group-card-placeholder";import AppLayout from "@/components/layouts/app";import { Button } from "@/components/ui/button";-import DataroomViewersTable from "@/components/visitors/dataroom-viewers";import { useDataroom } from "@/lib/swr/use-dataroom";import useDataroomGroups from "@/lib/swr/use-dataroom-groups";@@ -50,35 +49,9 @@ export default function DataroomGroupPage() {</h1></div><div className="flex w-full flex-wrap items-center gap-3 sm:w-auto">- <div className="w-full sm:w-auto">- {/* <SearchBoxPersisted- loading={loading}- onChangeDebounced={(t) => {- if (t) {- queryParams({ set: { search: t }, del: "page" });- } else {- queryParams({ del: "search" });- }- }}- /> */}- </div>- {/* <ToggleGroup- options={[- { value: "active", label: "Active" },- { value: "archived", label: "Archived" },- ]}- selected={archived ? "archived" : "active"}- selectAction={(id) =>- id === "active"- ? queryParams({ del: ["archived", "page"] })- : queryParams({ set: { archived: "true" }, del: "page" })- }- /> */}- {/* <AddDomainButton /> */}<Button onClick={() => setModalOpen(true)}>Create group</Button></div></div>- {/* {workspaceId && <AddEditDomainModal />} */}<div className="animate-fade-in">{!loading ? (viewerGroups && viewerGroups.length > 0 ? (@@ -114,18 +87,12 @@ export default function DataroomGroupPage() {<ul className="grid grid-cols-1 gap-3">{Array.from({ length: 3 }).map((_, idx) => (<li key={idx}>- {/* <DomainCardPlaceholder /> */}- Loading...+ <GroupCardPlaceholder /></li>))}</ul>)}</div>- {/* <Pagination- pageSize={50}- totalCount={domainsCount || 0}- unit="domains"- /> */}</div><AddGroupModal