mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
refactor: extract common components into UI package
This commit is contained in:
16
packages/ui/primitives/lazy-pdf-viewer.tsx
Normal file
16
packages/ui/primitives/lazy-pdf-viewer.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
'use client';
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
|
||||
import { Loader } from 'lucide-react';
|
||||
|
||||
export const LazyPDFViewer = dynamic(async () => import('./pdf-viewer'), {
|
||||
ssr: false,
|
||||
loading: () => (
|
||||
<div className="dark:bg-background flex min-h-[80vh] flex-col items-center justify-center bg-white/50">
|
||||
<Loader className="text-documenso h-12 w-12 animate-spin" />
|
||||
|
||||
<p className="text-muted-foreground mt-4">Loading document...</p>
|
||||
</div>
|
||||
),
|
||||
});
|
||||
Reference in New Issue
Block a user