fixes
All checks were successful
deploy to production / deploy (push) Successful in 34s

This commit is contained in:
2023-09-01 13:52:29 +00:00
parent e02ac8e1f7
commit 10eade80ae

View File

@@ -1,5 +1,14 @@
<script lang="ts">
export let col: Column
// A function to compare first names and sort the array
const sortByFirstName = (a, b) => {
const nameA = a.name.split(" ")[0] // Extracts the first name from "First Last"
const nameB = b.name.split(" ")[0]
return nameA.localeCompare(nameB)
}
col.boxList.boxes.sort(sortByFirstName) // Sorts the array in place
</script>
<div class="boxList">
@@ -14,7 +23,6 @@
@import "../../assets/css/main.less";
.boxList {
display: flex;
flex-wrap: wrap;
gap: 20px;
@@ -24,6 +32,5 @@
color: @font-color-secondary;
font-weight: bold;
}
}
</style>