u
This commit is contained in:
@@ -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 ?? '');
|
||||
|
||||
Reference in New Issue
Block a user