diff --git a/public/editor-client/src/defaultTemplates/index.ts b/public/editor-client/src/defaultTemplates/index.ts index 81b85bee92..4b1379ed78 100644 --- a/public/editor-client/src/defaultTemplates/index.ts +++ b/public/editor-client/src/defaultTemplates/index.ts @@ -47,7 +47,11 @@ const defaultKits = ( return { async getMeta(res, rej, kit) { try { - const data = await getDefaultKits(blocksChunkUrl, kit.id); + console.log("TEMPORARY URL, SHOULD BE STANDARD = ", blocksChunkUrl); + const data = await getDefaultKits( + "https://phplaravel-1109775-4184176.cloudwaysapps.com/api/get-kit-collections-chunk", + kit.id + ); const { types, blocks } = converterKit( data.blocks, @@ -193,9 +197,13 @@ const defaultLayouts = ( return { async getMeta(res, rej) { try { - const { templates, categories } = await getDefaultLayouts( + console.log( + "TEMPORARY URL, SHOULD BE STANDARD = ", layoutsChunkUrl ); + const { templates, categories } = await getDefaultLayouts( + "https://phplaravel-1109775-4184176.cloudwaysapps.com/api/get-layouts-chunk" + ); const data: LayoutsWithThumbs = { templates: convertLayouts(templates, templatesImageUrl), diff --git a/public/editor-client/src/defaultTemplates/utils.ts b/public/editor-client/src/defaultTemplates/utils.ts index 350b2e63f1..e8eeebf372 100644 --- a/public/editor-client/src/defaultTemplates/utils.ts +++ b/public/editor-client/src/defaultTemplates/utils.ts @@ -89,12 +89,16 @@ export const converterKit = ( theme }) => ({ id: slug, - cat: categories.split(",").map((item) => item.trim().toLowerCase()), + cat: categories + .split(",") + .map((item) => item.trim().toLowerCase()) + .filter((item) => item.length), title: slug, type: theme .split(",") .map((item) => item.trim()) - .map((i1) => i1.toLowerCase()), + .map((i1) => i1.toLowerCase()) + .filter((item) => item.length), keywords: keywords ?? "", thumbnailHeight, thumbnailWidth,