From 4b37355cc43272bd30de3d7546bca81dd88e978b Mon Sep 17 00:00:00 2001 From: pheralb Date: Mon, 1 Apr 2024 11:30:00 +0100 Subject: [PATCH] Design improvements, fixed select tag --- src/components/links/create-link.tsx | 21 ++++++++++++++------- src/components/links/edit-link.tsx | 5 +---- src/components/links/links-limit.tsx | 4 ++-- src/components/tags/search-tags.tsx | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/components/links/create-link.tsx b/src/components/links/create-link.tsx index 3e5d31b..69479c8 100644 --- a/src/components/links/create-link.tsx +++ b/src/components/links/create-link.tsx @@ -32,7 +32,7 @@ import { FormMessage, } from "@/ui/form"; import { Input, Textarea } from "@/ui/input"; -import { LoaderIcon, RocketIcon, ShuffleIcon } from "lucide-react"; +import { LoaderIcon, RocketIcon, ShuffleIcon, TagsIcon } from "lucide-react"; import { insertTagToLink } from "@/server/actions/tags"; import SelectTagsLink from "./select-tags-link"; @@ -222,12 +222,19 @@ export function CreateLink(props: CreateLinkProps) { )} /> {isError && {message}} - + {props.tags.length > 0 ? ( + + ) : ( +
+ +

You don't have any tag created.

+
+ )} diff --git a/src/components/links/edit-link.tsx b/src/components/links/edit-link.tsx index 0be06a2..a59f874 100644 --- a/src/components/links/edit-link.tsx +++ b/src/components/links/edit-link.tsx @@ -139,10 +139,7 @@ const EditLink = (props: EditLinkProps) => { - +

Editing the custom link will remove access from the previous link and it will be available to diff --git a/src/components/links/links-limit.tsx b/src/components/links/links-limit.tsx index 6309ed0..cf741b3 100644 --- a/src/components/links/links-limit.tsx +++ b/src/components/links/links-limit.tsx @@ -6,7 +6,7 @@ import { TooltipTrigger, } from "@/ui/tooltip"; import { cn } from "@/utils"; -import { CircleDashedIcon, TriangleAlertIcon } from "lucide-react"; +import { PackageIcon, TriangleAlertIcon } from "lucide-react"; interface LinksLimitProps { userLinks: number; @@ -36,7 +36,7 @@ const LinksLimit = ({ userLinks, maxLinks }: LinksLimitProps) => { {max ? ( ) : ( - + )} {userLinks < 10 ? `0${userLinks}` : userLinks} diff --git a/src/components/tags/search-tags.tsx b/src/components/tags/search-tags.tsx index 10b00a6..88a8e71 100644 --- a/src/components/tags/search-tags.tsx +++ b/src/components/tags/search-tags.tsx @@ -64,7 +64,7 @@ const SearchTag = (props: SearchTagProps) => { -

+

My Tags ({props.tags.length})