Skip to content

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

feat(trigger): remove trigger v2

Marc Seitza2400a1aedf6
diff --git a/components/datarooms/dataroom-document-card.tsx b/components/datarooms/dataroom-document-card.tsx
index 94616a29..7624375e 100644
--- a/components/datarooms/dataroom-document-card.tsx
+++ b/components/datarooms/dataroom-document-card.tsx
@@ -285,27 +285,23 @@ export default function DataroomDocumentCard({
</div>
</div>
- {
- // (teamInfo?.currentTeam?.id === "cluqtfmcr0001zkza4xcgqatw" ||
- // teamInfo?.currentTeam?.id === "clup33by90000oewh4rfvp2eg") &&
- ["pdf", "docs", "slides", "cad"].includes(
- dataroomDocument.document.type,
- ) &&
- !dataroomDocument.document.versions?.[0]?.hasPages &&
- dataroomDocument.document.versions?.[0]?.id && (
- <FileProcessStatusBar
- documentVersionId={dataroomDocument.document.versions[0].id}
- className="rounded-b-lg border-t border-gray-200 dark:border-gray-700"
- mutateDocument={() => {
- setIsProcessing(false);
- mutate(
- `/api/teams/${teamInfo?.currentTeam?.id}/datarooms/${dataroomId}/documents`,
- );
- }}
- onProcessingChange={(processing) => setIsProcessing(processing)}
- />
- )
- }
+ {["pdf", "docs", "slides", "cad"].includes(
+ dataroomDocument.document.type,
+ ) &&
+ !dataroomDocument.document.versions?.[0]?.hasPages &&
+ dataroomDocument.document.versions?.[0]?.id && (
+ <FileProcessStatusBar
+ documentVersionId={dataroomDocument.document.versions[0].id}
+ className="rounded-b-lg border-t border-gray-200 dark:border-gray-700"
+ mutateDocument={() => {
+ setIsProcessing(false);
+ mutate(
+ `/api/teams/${teamInfo?.currentTeam?.id}/datarooms/${dataroomId}/documents`,
+ );
+ }}
+ onProcessingChange={(processing) => setIsProcessing(processing)}
+ />
+ )}
</div>
{addDataRoomOpen ? (
<AddToDataroomModal
diff --git a/components/documents/process-status-bar.tsx b/components/documents/process-status-bar.tsx
deleted file mode 100644
index c3160691..00000000
--- a/components/documents/process-status-bar.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import { useEventRunStatuses } from "@trigger.dev/react";
-
-import { Progress } from "@/components/ui/progress";
-
-import { cn } from "@/lib/utils";
-
-export default function FileProcessStatusBar({
- documentVersionId,
- className,
-}: {
- documentVersionId: string;
- className?: string;
-}) {
- const { fetchStatus, error, statuses, run } =
- useEventRunStatuses(documentVersionId);
-
- if (fetchStatus === "loading") {
- return (
- <Progress
- value={0}
- text="Processing file..."
- className={cn(
- "w-full rounded-none text-[8px] font-semibold",
- className,
- )}
- />
- );
- }
-
- if (fetchStatus === "error") {
- return (
- <Progress
- value={0}
- text={error?.message || "Error processing file"}
- error={true}
- className={cn(
- "w-full rounded-none text-[8px] font-semibold",
- className,
- )}
- />
- );
- }
-
- if (run.status === "SUCCESS") {
- return null;
- }
-
- const progress = Number(statuses[0]?.data?.progress) * 100 || 0;
- const text = String(statuses[0]?.data?.text) || "Processing file...";
-
- if (run.status === "FAILURE") {
- return (
- <Progress
- value={progress}
- text="Error processing file"
- error={true}
- className={cn(
- "w-full rounded-none text-[8px] font-semibold",
- className,
- )}
- />
- );
- }
-
- return (
- <Progress
- value={progress}
- text={text}
- className={cn("w-full rounded-none text-[8px] font-semibold", className)}
- />
- );
-}
diff --git a/components/links/links-table.tsx b/components/links/links-table.tsx
index 13db069d..deb44803 100644
--- a/components/links/links-table.tsx
+++ b/components/links/links-table.tsx
@@ -8,7 +8,6 @@ import {
ArchiveIcon,
BoxesIcon,
Code2Icon,
- CopyIcon,
CopyPlusIcon,
EyeIcon,
LinkIcon,
@@ -32,7 +31,6 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { Skeleton } from "@/components/ui/skeleton";
import {
Table,
TableBody,
@@ -48,7 +46,6 @@ import { LinkWithViews, WatermarkConfig } from "@/lib/types";
import { cn, copyToClipboard, fetcher, nFormatter, timeAgo } from "@/lib/utils";
import FileProcessStatusBar from "../documents/file-process-status-bar";
-import ProcessStatusBar from "../documents/process-status-bar";
import BarChart from "../shared/icons/bar-chart";
import ChevronDown from "../shared/icons/chevron-down";
import MoreHorizontal from "../shared/icons/more-horizontal";
@@ -324,24 +321,12 @@ export default function LinksTable({
["pdf", "slides", "docs", "cad"].includes(
primaryVersion.type!,
) && (
- // <>
- // {teamInfo?.currentTeam?.id !==
- // "cluqtfmcr0001zkza4xcgqatw" &&
- // teamInfo?.currentTeam?.id !==
- // "clup33by90000oewh4rfvp2eg" ? (
- // <ProcessStatusBar
- // documentVersionId={primaryVersion.id}
- // className="absolute bottom-0 left-0 right-0 top-0 z-20 flex h-full items-center gap-x-8"
- // />
- // ) : (
<FileProcessStatusBar
documentVersionId={primaryVersion.id}
className="absolute bottom-0 left-0 right-0 top-0 z-20 flex h-full items-center gap-x-8"
// @ts-ignore: mutateDocument is not present on datarooms but on document pages
mutateDocument={mutateDocument}
/>
- // )}
- // </>
)}
<div className="flex w-full whitespace-nowrap text-sm group-hover/cell:opacity-0">