Fix todo sorting

This commit is contained in:
jude 2024-04-11 12:39:02 +01:00
parent 98f925dc84
commit b99bb7dcbf

View File

@ -17,8 +17,8 @@ export const GuildTodos = () => {
const sortedTodos = guildTodos const sortedTodos = guildTodos
.sort((a, b) => (a.id > b.id ? -1 : 1)) .sort((a, b) => (a.id > b.id ? -1 : 1))
.sort((a, b) => (a.channel_id < b.channel_id ? 0 : 1)); .sort((a, b) => (a.channel_id === b.channel_id ? 0 : a.channel_id > b.channel_id ? -1 : 1));
let prevChannel; let prevChannel: string;
return ( return (
<> <>