From 2ab391544822d46fed30cc67f5521b54f5f8edd2 Mon Sep 17 00:00:00 2001 From: mrfry Date: Tue, 11 May 2021 14:27:25 +0200 Subject: [PATCH] Removed reaction sorting --- src/components/reactButton.js | 46 +++++++++++++++-------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/src/components/reactButton.js b/src/components/reactButton.js index fb0219b..c16cddb 100644 --- a/src/components/reactButton.js +++ b/src/components/reactButton.js @@ -25,32 +25,26 @@ function ExistingReacts({ existingReacts, onClick, uid }) {
Reakció
{existingReacts && - Object.keys(existingReacts) - .sort((akey, bkey) => { - const a = existingReacts[akey] - const b = existingReacts[bkey] - return a.length < b.length - }) - .map((key) => { - const currReact = existingReacts[key] - const react = reactions[key] - if (!react) { - return null - } - return ( -
{ - e.stopPropagation() - onClick(key, currReact.includes(uid)) - }} - > - {react.emoji} {currReact.length} -
- ) - })} + Object.keys(existingReacts).map((key) => { + const currReact = existingReacts[key] + const react = reactions[key] + if (!react) { + return null + } + return ( +
{ + e.stopPropagation() + onClick(key, currReact.includes(uid)) + }} + > + {react.emoji} {currReact.length} +
+ ) + })}
) }