This commit is contained in:
seb
2026-10-05 10:33:18 +02:00
parent 5b4cf1683a
commit 8c5419c89e
15 changed files with 1613 additions and 320 deletions

View File

@@ -28,7 +28,7 @@ import {
import categoryAutomat from '../../automats/categoryAutomat';
import posterminalAutomat from '../../automats/posterminalAutomat';
import companyAutomat from '../../automats/companyAutomat';
import { setLastArticleSku, setLastCategorySlug } from '../../automats';
import { setLastArticleSku, setLastCategorySlug, setLastCategoryId } from '../../automats';
import {
categoryDisplayName,
getCategoryBreadcrumbs,
@@ -225,8 +225,13 @@ class ArtikelKategorienPage extends PureComponent {
return;
}
const isRoot = rootCategoryId != null && String(resolvedId) === String(rootCategoryId);
const activeCatId = isRoot ? null : String(resolvedId);
const fullCatPath = isRoot ? '/kategorien' : buildCategoryPath(categories, rootCategoryId, resolvedId);
setLastCategoryId(activeCatId, fullCatPath);
if (hasLegacyHomePrefix) {
navigate(buildCategoryPath(categories, rootCategoryId, resolvedId), { replace: true });
navigate(fullCatPath, { replace: true });
}
const nextHandle = categoryAutomat.key(categorySlugPath ?? '');