Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use url-join lib

dominik-zeglen41c45564e228
diff --git a/saleor/static/dashboard-next/customers/urls.ts b/saleor/static/dashboard-next/customers/urls.ts
index 980efdf89b..96104ffad9 100644
--- a/saleor/static/dashboard-next/customers/urls.ts
+++ b/saleor/static/dashboard-next/customers/urls.ts
@@ -1,6 +1,9 @@
+import * as urlJoin from "url-join";
+
export const customerSection = "/customers/";
export const customerListUrl = customerSection;
-export const customerUrl = (id: string) => customerSection + id + "/";
+export const customerUrl = (id: string) => urlJoin(customerSection, id);
-export const customerAddUrl = customerSection + "add/";
-export const customerRemoveUrl = (id: string) => customerUrl(id) + "remove/";
+export const customerAddUrl = urlJoin(customerSection, "add");
+export const customerRemoveUrl = (id: string) =>
+ urlJoin(customerUrl(id), "remove");