mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
support dynamic content on PLP
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
1
lib/types.ts
Normal file
1
lib/types.ts
Normal file
@@ -0,0 +1 @@
|
||||
export type SearchParams = { [key: string]: string | string[] | undefined };
|
@@ -145,7 +145,7 @@ export const isBeforeToday = (date?: string | null) => {
|
||||
};
|
||||
|
||||
export const getCollectionUrl = (handle: string, includeSlashPrefix = true) => {
|
||||
const rewriteUrl = handle.split('_').filter(Boolean).join('/');
|
||||
const rewriteUrl = handle.split('_').filter(Boolean).join('/').toLowerCase();
|
||||
|
||||
return includeSlashPrefix ? `/${rewriteUrl}` : rewriteUrl;
|
||||
};
|
||||
|
Reference in New Issue
Block a user