feat(prerender): add 'Neuheiten' category and update data fetching logic
- Introduce a new category 'Neuheiten' to the rendering process by appending it to the existing categories. - Modify the data fetching logic to handle the 'neu' category ID correctly. - Enhance the UI by adding a button for the 'Neuheiten' category in the CategoryList component, complete with styling and internationalization support.
This commit is contained in:
@@ -525,7 +525,14 @@ const renderApp = async (categoryData, socket) => {
|
||||
let categoryPagesRendered = 0;
|
||||
let categoriesWithProducts = 0;
|
||||
|
||||
for (const category of allCategories) {
|
||||
const allCategoriesPlusNeu = [...allCategories, {
|
||||
id: "neu",
|
||||
name: "Neuheiten",
|
||||
seoName: "neu",
|
||||
parentId: 209
|
||||
}];
|
||||
|
||||
for (const category of allCategoriesPlusNeu) {
|
||||
// Skip categories without seoName
|
||||
if (!category.seoName) {
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user