a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

sort by id if created_ats are equal on homepage

+9 -1
+9 -1
app/home/LeafletList.tsx
··· 38 38 }, [localLeaflets.length, mutate]); 39 39 let leaflets = identity 40 40 ? identity.permission_token_on_homepage 41 - .sort((a, b) => (a.created_at > b.created_at ? -1 : 1)) 41 + .sort((a, b) => 42 + a.created_at === b.created_at 43 + ? a.permission_tokens.id > b.permission_tokens.id 44 + ? -1 45 + : 1 46 + : a.created_at > b.created_at 47 + ? -1 48 + : 1, 49 + ) 42 50 .map((ptoh) => ptoh.permission_tokens) 43 51 : localLeaflets 44 52 .sort((a, b) => (a.added_at > b.added_at ? -1 : 1))