From dcdb5a739553e994497be5eb993414f30ecd3b67 Mon Sep 17 00:00:00 2001 From: Aamir Azad Date: Wed, 7 Aug 2024 13:02:56 -0400 Subject: [PATCH] fix: minor visual changes on the details page --- src/components/document-details.tsx | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/components/document-details.tsx b/src/components/document-details.tsx index 35b8234..630e752 100644 --- a/src/components/document-details.tsx +++ b/src/components/document-details.tsx @@ -1,6 +1,5 @@ "use client"; -import { Download } from "lucide-react"; import { AlertDialog, AlertDialogAction, @@ -14,7 +13,7 @@ import { } from "@/components/ui/alert-dialog"; import { toast } from "sonner"; import { getUserData } from "@/app/actions"; -import { Button, buttonVariants } from "@/components/ui/button"; +import { buttonVariants } from "@/components/ui/button"; import { useRouter, useSearchParams } from "next/navigation"; import { useQuery, @@ -96,7 +95,6 @@ async function getPaperlessDocumentData(id: number, userData: UsersTableType) { Authorization: `Token ${userData.paperlessToken}`, }, }); - console.log(response); if (response.ok) { const data = (await response.json()) as PaperlessDocumentType; return data; @@ -126,7 +124,6 @@ function DocumentDetailsInner(props: { id: number }) { queryKey: ["pdfUrl", props.id, userData], // Include id and userData in the query key queryFn: async () => { const result = await getPaperlessDocument(props.id, userData!); - console.log("Fetched PDF URL:", result); return result; }, enabled: !!userData, @@ -137,7 +134,6 @@ function DocumentDetailsInner(props: { id: number }) { queryKey: ["documentData", props.id, userData], // Include id and userData in the query key queryFn: async () => { const result = await getPaperlessDocumentData(props.id, userData!); - console.log("Fetched Document Data:", result); return result; }, enabled: !!userData, @@ -153,14 +149,17 @@ function DocumentDetailsInner(props: { id: number }) {
-
+

{documentData?.title}

- +
+ + +
{/* - Download - - */} + Download + + */} Are you absolutely sure? This action cannot be undone. This will permanently delete - the recording. + the pdf.