mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 09:41:35 +10:00
feat: add empty state for different status
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
import Link from 'next/link';
|
||||
|
||||
import { CheckCircle2 } from 'lucide-react';
|
||||
|
||||
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-session';
|
||||
import { findDocuments } from '@documenso/lib/server-only/document/find-documents';
|
||||
import { getStats } from '@documenso/lib/server-only/document/get-stats';
|
||||
@ -15,6 +13,7 @@ import { DocumentStatus } from '~/components/formatter/document-status';
|
||||
|
||||
import { UploadDocument } from '../dashboard/upload-document';
|
||||
import { DocumentsDataTable } from './data-table';
|
||||
import EmptyDocumentState from './empty-state';
|
||||
|
||||
export type DocumentsPageProps = {
|
||||
searchParams?: {
|
||||
@ -98,20 +97,8 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
|
||||
|
||||
<div className="mt-8">
|
||||
{results.count > 0 && <DocumentsDataTable results={results} />}
|
||||
{results.count === 0 && <EmptyDocumentState />}
|
||||
{results.count === 0 && <EmptyDocumentState status={status} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const EmptyDocumentState = () => {
|
||||
return (
|
||||
<div className="text-muted-foreground/50 flex h-96 flex-col items-center justify-center space-y-3">
|
||||
<CheckCircle2 className="text-muted-foreground/50 h-14 w-14" />
|
||||
<div className="text-center">
|
||||
<h3 className="text-lg font-semibold">All done</h3>
|
||||
<p>All documents signed for now.</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user