Skip to content

Commit

Permalink
Feat/sort track events (#710)
Browse files Browse the repository at this point in the history
* feat: sort track events

Signed-off-by: David Dal Busco <[email protected]>

* feat: sort track events

Signed-off-by: David Dal Busco <[email protected]>

---------

Signed-off-by: David Dal Busco <[email protected]>
  • Loading branch information
peterpeterparker committed Aug 27, 2024
1 parent 3b4dfe0 commit 5de47a7
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
export let trackEvents: AnalyticsTrackEvents;
let total: Array<[string, number]>;
$: ({ total } = trackEvents);
const setTotal = () => {
const { total: t } = trackEvents;
t.sort(([keyA, _], [keyB, __]) => keyA.localeCompare(keyB));
total = t;
};
$: trackEvents, setTotal();
</script>

<div class="table-container">
Expand Down

0 comments on commit 5de47a7

Please sign in to comment.