wip: create document workflow

This commit is contained in:
Mythie
2023-06-10 22:33:12 +10:00
parent 803ebccee3
commit b0e364acf4
9 changed files with 506 additions and 54 deletions

View File

@ -1,7 +1,5 @@
'use client';
import { Suspense } from 'react';
import dynamic from 'next/dynamic';
import { Loader } from 'lucide-react';
@ -15,7 +13,7 @@ export type LoadablePDFCard = PDFViewerProps & {
pdfClassName?: string;
};
const PDFCard = dynamic(async () => import('~/components/(dashboard)/pdf-viewer/pdf-viewer'), {
const PDFViewer = dynamic(async () => import('~/components/(dashboard)/pdf-viewer/pdf-viewer'), {
ssr: false,
loading: () => (
<div className="flex min-h-[80vh] flex-col items-center justify-center bg-white/50">
@ -30,7 +28,7 @@ export const LoadablePDFCard = ({ className, pdfClassName, ...props }: LoadableP
return (
<Card className={className} gradient {...props}>
<CardContent className="p-2">
<PDFCard className={pdfClassName} {...props} />
<PDFViewer className={pdfClassName} {...props} />
</CardContent>
</Card>
);