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.

create a link within the selected folder

Kiran K9f0814def51f
diff --git a/apps/web/ui/modals/add-edit-link-modal/index.tsx b/apps/web/ui/modals/add-edit-link-modal/index.tsx
index bd56c4c01b..c04475c1c2 100644
--- a/apps/web/ui/modals/add-edit-link-modal/index.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/index.tsx
@@ -272,12 +272,15 @@ function AddEditLinkModal({
onSubmit={async (e) => {
e.preventDefault();
setSaving(true);
+
// @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),
+ ...(folderId && { folderId }),
};
fetch(endpoint.url, {
method: endpoint.method,