diff --git a/package.json b/package.json index 12bd6ae..b698f44 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "db:migrate": "drizzle-kit migrate", "db:push": "drizzle-kit push", "db:studio": "drizzle-kit studio", - "dev": "next dev", + "dev": "next dev --turbo", "lint": "next lint", "start": "next start" }, diff --git a/src/app/paperless/document/[id]/page.tsx b/src/app/paperless/document/[id]/page.tsx index 89eec4f..71f8717 100644 --- a/src/app/paperless/document/[id]/page.tsx +++ b/src/app/paperless/document/[id]/page.tsx @@ -5,5 +5,9 @@ export default function ModalDocumentPage({ }: { params: { id: number }; }) { - return ; + return ( +
+ +
+ ); } diff --git a/src/components/document-viewer.tsx b/src/components/document-viewer.tsx index c84d51e..ae9a853 100644 --- a/src/components/document-viewer.tsx +++ b/src/components/document-viewer.tsx @@ -41,6 +41,29 @@ export default function DocumentViewer(props: { id: number }) { const [pdfUrl, setPdfUrl] = useState(null); const [loading, setLoading] = useState(true); + const SkeletonLoader = () => ( +
+
+
+
+ {/* PDF Skeleton */} +
+ {/* Button Skeleton */} +
+
+
+
+
+
+
+
+
+
+
+
+
+ ); + useEffect(() => { const fetchData = async () => { setLoading(true); @@ -65,15 +88,7 @@ export default function DocumentViewer(props: { id: number }) { }, [props.id]); // Dependency array to refetch if id changes if (loading) { - return ( -
-
- - Loading... - -
-
- ); + return ; } if (!pdfUrl) { diff --git a/tailwind.config.ts b/tailwind.config.ts index 4ff1b0a..b0a0df9 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,5 +1,4 @@ import type { Config } from "tailwindcss"; -const { fontFamily } = require("tailwindcss/defaultTheme"); const config = { darkMode: ["class"],