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:
parent
933b453498
commit
2ab3915448
1 changed files with 20 additions and 26 deletions
|
@ -25,32 +25,26 @@ function ExistingReacts({ existingReacts, onClick, uid }) {
|
||||||
<div className={styles.reactionContainer}>
|
<div className={styles.reactionContainer}>
|
||||||
<div className={styles.react_bttn}>Reakció</div>
|
<div className={styles.react_bttn}>Reakció</div>
|
||||||
{existingReacts &&
|
{existingReacts &&
|
||||||
Object.keys(existingReacts)
|
Object.keys(existingReacts).map((key) => {
|
||||||
.sort((akey, bkey) => {
|
const currReact = existingReacts[key]
|
||||||
const a = existingReacts[akey]
|
const react = reactions[key]
|
||||||
const b = existingReacts[bkey]
|
if (!react) {
|
||||||
return a.length < b.length
|
return null
|
||||||
})
|
}
|
||||||
.map((key) => {
|
return (
|
||||||
const currReact = existingReacts[key]
|
<div
|
||||||
const react = reactions[key]
|
title={`'${key}': ${currReact.join(', ')}`}
|
||||||
if (!react) {
|
className={`${currReact.includes(uid) && styles.reacted}`}
|
||||||
return null
|
key={key}
|
||||||
}
|
onClick={(e) => {
|
||||||
return (
|
e.stopPropagation()
|
||||||
<div
|
onClick(key, currReact.includes(uid))
|
||||||
title={`'${key}': ${currReact.join(', ')}`}
|
}}
|
||||||
className={`${currReact.includes(uid) && styles.reacted}`}
|
>
|
||||||
key={key}
|
{react.emoji} {currReact.length}
|
||||||
onClick={(e) => {
|
</div>
|
||||||
e.stopPropagation()
|
)
|
||||||
onClick(key, currReact.includes(uid))
|
})}
|
||||||
}}
|
|
||||||
>
|
|
||||||
{react.emoji} {currReact.length}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue