Alphabetized categories on home page (again).

This commit is contained in:
David Ball 2024-07-16 14:08:15 -04:00
parent 935340d90e
commit 58a7fd8405

View File

@ -14,7 +14,7 @@ import { getProductsForCategoryId } from '../data/products';
Your one-stop shop for all your after-market Dasher supplies. Your one-stop shop for all your after-market Dasher supplies.
</p> </p>
<ul role="list" class="link-card-grid"> <ul role="list" class="link-card-grid">
{ALL_CATEGORIES.children.filter(categoryNode => getProductsForCategoryId(categoryNode.value.id).length > 0).map(categoryNode => ( {ALL_CATEGORIES.children.filter(categoryNode => getProductsForCategoryId(categoryNode.value.id).length > 0).sort((left, right) => left.value.category.localeCompare(right.value.category)).map(categoryNode => (
<CategoryCard <CategoryCard
category={categoryNode.value} category={categoryNode.value}
/> />