Skip to content

Commit

Permalink
Merge pull request #624 from mfts/fix/limit-links
Browse files Browse the repository at this point in the history
  • Loading branch information
mfts authored Sep 29, 2024
2 parents 4dd9a26 + f822a9a commit 3cf9fb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
17 changes: 1 addition & 16 deletions components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,22 +335,7 @@ function UsageProgress(data: {
<div className="mt-2 flex flex-col space-y-2">
{usage !== undefined && usageLimit !== undefined ? (
<p className="text-sm text-foreground">
<span
className={cn(
usagePercentage > 100 && "text-destructive dark:text-red-600",
)}
>
{nFormatter(usage)}
</span>{" "}
/ {nFormatter(usageLimit)} {unit}{" "}
<span
className={cn(
usagePercentage > 100 && "text-destructive dark:text-red-600",
)}
>
({usagePercentage.toFixed(0)}
%)
</span>
<span>{nFormatter(usage)}</span> / {nFormatter(usageLimit)} {unit}
</p>
) : (
<div className="h-5 w-32 animate-pulse rounded-md bg-muted" />
Expand Down
5 changes: 1 addition & 4 deletions components/ui/progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ const Progress = React.forwardRef<
{...props}
>
<ProgressPrimitive.Indicator
className={cn(
"h-full w-full flex-1 bg-primary transition-all",
value && value > 100 ? "bg-destructive dark:bg-red-600" : "",
)}
className="h-full w-full flex-1 bg-primary transition-all"
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
{text && !error ? (
Expand Down

0 comments on commit 3cf9fb8

Please sign in to comment.