Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat(dr): add empty state for dataroom page

Marc Seitz33bf01b5e588
diff --git a/components/datarooms/empty-dataroom.tsx b/components/datarooms/empty-dataroom.tsx
new file mode 100644
index 00000000..c299cb30
--- /dev/null
+++ b/components/datarooms/empty-dataroom.tsx
@@ -0,0 +1,18 @@
+import { ServerIcon } from "lucide-react";
+
+export function EmptyDataroom() {
+ return (
+ <div className="text-center">
+ <ServerIcon
+ className="mx-auto h-12 w-12 text-muted-foreground"
+ strokeWidth={1}
+ />
+ <h3 className="mt-2 text-sm font-medium text-foreground">
+ No datarooms here
+ </h3>
+ <p className="mt-1 text-sm text-muted-foreground">
+ Get started by creating a new dataroom.
+ </p>
+ </div>
+ );
+}
diff --git a/pages/datarooms/index.tsx b/pages/datarooms/index.tsx
index 207c5161..ad1ac76f 100644
--- a/pages/datarooms/index.tsx
+++ b/pages/datarooms/index.tsx
@@ -1,4 +1,5 @@
import { AddDataroomModal } from "@/components/datarooms/add-dataroom-modal";
+import { EmptyDataroom } from "@/components/datarooms/empty-dataroom";
import AppLayout from "@/components/layouts/app";
import { Button } from "@/components/ui/button";
import {
@@ -76,6 +77,12 @@ export default function DataroomsPage() {
</Link>
))}
</ul>
+
+ {datarooms && datarooms.length === 0 && (
+ <div className="flex items-center justify-center">
+ <EmptyDataroom />
+ </div>
+ )}
</div>
</main>
</AppLayout>