Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: cleanup

Marc Seitzbb43ee26def5
diff --git a/components/documents/process-status-bar.tsx b/components/documents/process-status-bar.tsx
index 26d8bffb..c72fc995 100644
--- a/components/documents/process-status-bar.tsx
+++ b/components/documents/process-status-bar.tsx
@@ -1,7 +1,4 @@
import { Progress } from "@/components/ui/progress";
-import ErrorPage from "next/error";
-import { useDocumentProcessingStatus } from "@/lib/swr/use-document";
-import { useEffect, useState } from "react";
import { cn } from "@/lib/utils";
import { useEventRunStatuses } from "@trigger.dev/react";
@@ -15,33 +12,13 @@ export default function ProcessStatusBar({
const { fetchStatus, error, statuses, run } =
useEventRunStatuses(documentVersionId);
- // const { status, loading, error: DocError } =
- // useDocumentProcessingStatus(documentVersionId);
-
- // const [progress, setProgress] = useState<number>(0);
- // const [text, setText] = useState<string>("");
-
- // useEffect(() => {
- // if (status) {
- // const progress = (status.currentPageCount / status.totalPages) * 100;
- // setProgress(progress);
- // if (progress === 100) {
- // setText("Processing complete");
- // } else {
- // setText(
- // `${status.currentPageCount} / ${status.totalPages} pages processed`,
- // );
- // }
- // }
- // }, [status]);
-
- // if (error && error.status === 404) {
- // return <ErrorPage statusCode={404} />;
- // }
-
if (fetchStatus === "loading") {
return (
- <Progress value={0} className={cn("w-full rounded-none", className)} />
+ <Progress
+ value={0}
+ text="Processing document..."
+ className={cn("w-full rounded-none", className)}
+ />
);
}
@@ -59,14 +36,6 @@ export default function ProcessStatusBar({
return null;
}
- console.log("statuses", statuses);
-
- console.log(
- "status",
- statuses[0].key,
- statuses[0].data?.progress,
- statuses[0].data?.text,
- );
const progress = Number(statuses[0].data?.progress) * 100 || 0;
const text = String(statuses[0].data?.text) || "";
@@ -74,10 +43,7 @@ export default function ProcessStatusBar({
<Progress
value={progress}
text={text}
- className={cn(
- "w-full text-[8px] font-semibold capitalize rounded-none",
- className,
- )}
+ className={cn("w-full text-[8px] font-semibold rounded-none", className)}
/>
);
}