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"> <script lang="ts">
export let col: Column 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> </script>
<div class="boxList"> <div class="boxList">
@@ -14,7 +23,6 @@
@import "../../assets/css/main.less"; @import "../../assets/css/main.less";
.boxList { .boxList {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 20px; gap: 20px;
@@ -24,6 +32,5 @@
color: @font-color-secondary; color: @font-color-secondary;
font-weight: bold; font-weight: bold;
} }
} }
</style> </style>