Only rendering the emoji picker when it's needed

If not done so the whole channel select render will take an eternity
This commit is contained in:
WolverinDEV 2021-01-06 17:26:34 +01:00
parent 4d9df41c35
commit b17fb5dea8

View file

@ -59,7 +59,9 @@ const EmojiButton = (props: { events: Registry<ChatBoxEvents> }) => {
<img alt={""} src={"img/smiley-smile.svg"} />
</div>
<div className={cssStyle.picker} style={{ display: shown ? undefined : "none" }}>
{!shown ? undefined :
<Picker
key={"picker"}
set={"twitter"}
theme={"light"}
showPreview={true}
@ -74,6 +76,7 @@ const EmojiButton = (props: { events: Registry<ChatBoxEvents> }) => {
}
}}
/>
}
</div>
</div>
);