Add SKU edit actions
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m18s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m18s
This commit is contained in:
14
src/catalogLinks.ts
Normal file
14
src/catalogLinks.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
type SkuEditParams = {
|
||||
sku: string;
|
||||
name?: string;
|
||||
color?: string;
|
||||
size?: string;
|
||||
};
|
||||
|
||||
export const buildSkuEditPath = ({ sku, name = '', color = '', size = '' }: SkuEditParams) => {
|
||||
const params = new URLSearchParams({ tab: 'products', sku });
|
||||
if (name) params.set('name', name);
|
||||
if (color) params.set('color', color);
|
||||
if (size) params.set('size', size);
|
||||
return `/registrations?${params.toString()}`;
|
||||
};
|
||||
Reference in New Issue
Block a user