Skip to content

Commit

Permalink
Replace custom progress bar with ProgressBar in ClearTableConfirmatio…
Browse files Browse the repository at this point in the history
…n (#34577)

Replace custom progress bar with ProgressBar component in ClearTableConfirmation

GitOrigin-RevId: a4ed51d6baa774023086f1e9e656570009b18447
  • Loading branch information
devin-ai-integration[bot] authored and Convex, Inc. committed Feb 22, 2025
1 parent 0934a47 commit b12d9c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useInvalidateShapes } from "@common/features/data/lib/api";
import { ConfirmationDialog } from "@common/elements/ConfirmationDialog";
import { toast } from "@common/lib/utils";
import { DeploymentInfoContext } from "@common/lib/deploymentContext";
import { ProgressBar } from "@common/elements/ProgressBar";

export function ClearTableConfirmation({
numRows,
Expand Down Expand Up @@ -101,12 +102,10 @@ export function ClearTableConfirmation({
isClearing ? (
<div className="flex flex-col gap-2">
<span className="text-xs font-semibold">{progressPct}% done</span>
<div className="mb-4 h-2.5 w-full rounded-full bg-background-tertiary">
<div
className="h-2.5 animate-pulse rounded-l-full bg-util-accent transition-[width]"
style={{ width: `${progressPct}%` }}
/>
</div>
<ProgressBar
fraction={progressPct / 100}
ariaLabel="Clear table progress"
/>
</div>
) : (
<div className="flex flex-col gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Doc } from "system-udfs/convex/_generated/dataModel";
import { DeploymentResponse, Team } from "generatedApi";
import udfs from "dashboard-common/udfs";
import { CheckCircledIcon, CrossCircledIcon } from "@radix-ui/react-icons";
import { ProgressBar } from "elements/ProgressBar";
import { ProgressBar } from "@common/elements/ProgressBar";
import { useListCloudBackups, BackupResponse } from "api/backups";
import { TransferSummary } from "./BackupListItem";
import { ImportSummary } from "./SnapshotImport";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StoryObj } from "@storybook/react";
import { useEffect, useState } from "react";
import { ProgressBar } from "./ProgressBar";
import { ProgressBar } from "@common/elements/ProgressBar";

export default {
component: ProgressBar,
Expand Down

0 comments on commit b12d9c8

Please sign in to comment.