File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -15,22 +15,24 @@ let products: CollectionEntry<"products">[] = await getCollection(
1515 },
1616);
1717
18- let productData: ProductData [] = products .map ((product ) => {
19- const iconData = getIconData (iconCollection .local , product .id );
20- let icon = undefined ;
21- if (iconData ) {
22- icon = iconToSVG (iconData );
23- }
18+ let productData: ProductData [] = products
19+ .map ((product ) => {
20+ const iconData = getIconData (iconCollection .local , product .id );
21+ let icon = undefined ;
22+ if (iconData ) {
23+ icon = iconToSVG (iconData );
24+ }
2425
25- return {
26- ... product ,
27- icon ,
28- groups: [
29- product .data .product .group ,
30- ... (product .data .product .additional_groups || []),
31- ].filter ((val ) => Boolean (val )),
32- };
33- });
26+ return {
27+ ... product ,
28+ icon ,
29+ groups: [
30+ product .data .product .group ,
31+ ... (product .data .product .additional_groups || []),
32+ ].filter ((val ) => Boolean (val )),
33+ };
34+ })
35+ .sort ((a , b ) => a .id .localeCompare (b .id ));
3436
3537const props = {
3638 frontmatter: {
You can’t perform that action at this time.
0 commit comments