Fix random order on framework overview
Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -68,14 +68,14 @@ function FrameworkOverviewPageContent({
|
|||||||
return acc;
|
return acc;
|
||||||
}, {} as Record<string, typeof controls>);
|
}, {} as Record<string, typeof controls>);
|
||||||
|
|
||||||
const controlCards = Object.entries(controlsByCategory).map(
|
const controlCards = Object.entries(controlsByCategory)
|
||||||
([category, controls]) => ({
|
.sort(([categoryA], [categoryB]) => categoryA.localeCompare(categoryB))
|
||||||
|
.map(([category, controls]) => ({
|
||||||
title: category,
|
title: category,
|
||||||
controls,
|
controls,
|
||||||
completed: controls.filter((c) => c?.state === "IMPLEMENTED").length,
|
completed: controls.filter((c) => c?.state === "IMPLEMENTED").length,
|
||||||
total: controls.length,
|
total: controls.length,
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
|
|
||||||
const totalImplemented = controls.filter(
|
const totalImplemented = controls.filter(
|
||||||
(c) => c?.state === "IMPLEMENTED"
|
(c) => c?.state === "IMPLEMENTED"
|
||||||
|
|||||||
Reference in New Issue
Block a user