forked from crowetic/commerce
Added links to pages in the footer
This commit is contained in:
5
utils/get-slug.ts
Normal file
5
utils/get-slug.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// Remove trailing and leading slash, usually included in nodes
|
||||
// returned by the BigCommerce API
|
||||
const getSlug = (path: string) => path.replace(/^\/|\/$/g, '')
|
||||
|
||||
export default getSlug
|
@@ -34,9 +34,6 @@ export const filterQuery = (query: any) =>
|
||||
return obj
|
||||
}, {})
|
||||
|
||||
// Remove trailing and leading slash
|
||||
export const getSlug = (path: string) => path.replace(/^\/|\/$/g, '')
|
||||
|
||||
export const getCategoryPath = (slug: string, brand?: string) =>
|
||||
`/search${brand ? `/designers/${brand}` : ''}${slug ? `/${slug}` : ''}`
|
||||
|
||||
|
Reference in New Issue
Block a user