The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Fix merge
Tim Wilson6d9666c39f3a
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.tsindex 937ce0ded2..390c384842 100644--- a/apps/web/lib/api/links.ts+++ b/apps/web/lib/api/links.ts@@ -80,19 +80,17 @@ export async function getLinksForProject({},include: {user: true,- ...(withTags && {- tags: {- include: {- tag: {- select: {- id: true,- name: true,- color: true,- },+ tags: {+ include: {+ tag: {+ select: {+ id: true,+ name: true,+ color: true,},},},- }),+ },},orderBy: {[sort]: "desc",@@ -110,7 +108,7 @@ export async function getLinksForProject({});return {...link,- tags: withTags ? link.tags.map(({ tag }) => tag) : undefined,+ tags: link.tags.map(({ tag }) => tag),shortLink,qrCode: `https://api.dub.co/qr?url=${shortLink}`,};diff --git a/apps/web/ui/modals/add-edit-link-modal/tags-section.tsx b/apps/web/ui/modals/add-edit-link-modal/tags-section.tsxindex 0fc0554a29..ff48a5c79b 100644--- a/apps/web/ui/modals/add-edit-link-modal/tags-section.tsx+++ b/apps/web/ui/modals/add-edit-link-modal/tags-section.tsx@@ -3,7 +3,7 @@ import { LinkWithTagsProps } from "@/lib/types";import TagBadge from "@/ui/links/tag-badge";import { LoadingCircle, SimpleTooltipContent, Tooltip } from "@dub/ui";import { HOME_DOMAIN } from "@dub/utils";-import { Command } from "cmdk";+import { Command, useCommandState } from "cmdk";import { Check, ChevronDown, Tag, X } from "lucide-react";import { useParams } from "next/navigation";import { Dispatch, SetStateAction, useEffect, useRef, useState } from "react";@@ -63,6 +63,7 @@ export default function TagsSection({}, [commandRef, openCommandList]);const CommandInput = () => {+ const isEmpty = useCommandState((state) => state.filtered.count === 0);return (<Command.Inputplaceholder="Select tags..."