From b99bb7dcbf59caeaad0dfd1b3940866b31c64462 Mon Sep 17 00:00:00 2001 From: jude Date: Thu, 11 Apr 2024 12:39:02 +0100 Subject: [PATCH] Fix todo sorting --- reminder-dashboard/src/components/Guild/GuildTodos.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reminder-dashboard/src/components/Guild/GuildTodos.tsx b/reminder-dashboard/src/components/Guild/GuildTodos.tsx index 5e35c2a..4e9ff8f 100644 --- a/reminder-dashboard/src/components/Guild/GuildTodos.tsx +++ b/reminder-dashboard/src/components/Guild/GuildTodos.tsx @@ -17,8 +17,8 @@ export const GuildTodos = () => { const sortedTodos = guildTodos .sort((a, b) => (a.id > b.id ? -1 : 1)) - .sort((a, b) => (a.channel_id < b.channel_id ? 0 : 1)); - let prevChannel; + .sort((a, b) => (a.channel_id === b.channel_id ? 0 : a.channel_id > b.channel_id ? -1 : 1)); + let prevChannel: string; return ( <>