Skip to content

Commit

Permalink
Update delete-link and links-limit components
Browse files Browse the repository at this point in the history
  • Loading branch information
pheralb committed Mar 31, 2024
1 parent 0f397ea commit 2ecde61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/links/delete-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const DeleteLink = ({ link, trigger }: DeleteLinkProps) => {
confirm:
</FormLabel>
<FormControl>
<Input {...field} disabled={loading} />
<Input {...field} disabled={loading} autoComplete="off" />
</FormControl>
<FormMessage />
</FormItem>
Expand Down
13 changes: 9 additions & 4 deletions src/components/links/links-limit.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { buttonVariants } from "@/ui/button";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/ui/tooltip";
import { cn } from "@/utils";
import { PackageIcon, TriangleAlertIcon } from "lucide-react";
import { CircleDashedIcon, TriangleAlertIcon } from "lucide-react";

interface LinksLimitProps {
userLinks: number;
Expand All @@ -19,7 +20,12 @@ const LinksLimit = ({ userLinks, maxLinks }: LinksLimitProps) => {
<TooltipProvider delayDuration={500}>
<Tooltip>
<TooltipTrigger asChild>
<div className="flex cursor-default items-center justify-end font-mono text-sm">
<div
className={buttonVariants({
variant: "outline",
className: "cursor-default font-mono shadow-none",
})}
>
<div
className={cn(
mid ? "text-yellow-500" : "",
Expand All @@ -30,13 +36,12 @@ const LinksLimit = ({ userLinks, maxLinks }: LinksLimitProps) => {
{max ? (
<TriangleAlertIcon size={14} />
) : (
<PackageIcon size={14} />
<CircleDashedIcon size={14} />
)}
<span>
{userLinks < 10 ? `0${userLinks}` : userLinks}
{"/"}
{maxLinks < 10 ? `0${maxLinks}` : maxLinks}
{" links "}
</span>
</div>
</div>
Expand Down

0 comments on commit 2ecde61

Please sign in to comment.