Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update index.tsx

Steven Teyf942544cfe94
diff --git a/apps/web/ui/modals/link-builder/index.tsx b/apps/web/ui/modals/link-builder/index.tsx
index 045039c7ba..1b0eeec82d 100644
--- a/apps/web/ui/modals/link-builder/index.tsx
+++ b/apps/web/ui/modals/link-builder/index.tsx
@@ -239,10 +239,13 @@ function LinkBuilderInner({
onSubmit={handleSubmit(async (data) => {
// @ts-ignore – exclude extra attributes from `data` object before sending to API
const { user, tags, tagId, ...rest } = data;
+ const folderId = searchParams.get("folderId");
const bodyData = {
...rest,
// Map tags to tagIds
tagIds: tags.map(({ id }) => id),
+ // if folderId is available, add it to the body data
+ ...(folderId ? { folderId } : {}),
// Manually reset empty strings to null
expiredUrl: rest.expiredUrl || null,