diff --git a/src/pages/Member.svelte b/src/pages/Member.svelte index 1cb8edb2..54609f9b 100644 --- a/src/pages/Member.svelte +++ b/src/pages/Member.svelte @@ -35,7 +35,8 @@ $: indexOfFirstItem = indexOfLastItem - itemsPerPage; $: pageAmount = Math.ceil(groups.length / itemsPerPage); - $: slicedGroups = groups.slice(indexOfFirstItem, indexOfLastItem); + $: orderedGroups = groups.sort((a, b) => a.name.localeCompare(b.name)); + $: slicedGroups = orderedGroups.slice(indexOfFirstItem, indexOfLastItem); onMount(() => { fetchMember();