mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Removed reaction sorting
This commit is contained in:
@@ -25,32 +25,26 @@ function ExistingReacts({ existingReacts, onClick, uid }) {
|
||||
<div className={styles.reactionContainer}>
|
||||
<div className={styles.react_bttn}>Reakció</div>
|
||||
{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 (
|
||||
<div
|
||||
title={`'${key}': ${currReact.join(', ')}`}
|
||||
className={`${currReact.includes(uid) && styles.reacted}`}
|
||||
key={key}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onClick(key, currReact.includes(uid))
|
||||
}}
|
||||
>
|
||||
{react.emoji} {currReact.length}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
Object.keys(existingReacts).map((key) => {
|
||||
const currReact = existingReacts[key]
|
||||
const react = reactions[key]
|
||||
if (!react) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<div
|
||||
title={`'${key}': ${currReact.join(', ')}`}
|
||||
className={`${currReact.includes(uid) && styles.reacted}`}
|
||||
key={key}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onClick(key, currReact.includes(uid))
|
||||
}}
|
||||
>
|
||||
{react.emoji} {currReact.length}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user