fix: properly align emoji name in autocompletion

This commit is contained in:
Jan 2022-10-26 09:13:14 +02:00
parent 35fb6b4381
commit 0f0d41615b

View file

@ -432,7 +432,12 @@ export default function AutoComplete({
}) })
} }
onClick={onClick}> onClick={onClick}>
<div> <div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "center",
}}>
{match instanceof CustomEmoji ? ( {match instanceof CustomEmoji ? (
<img <img
loading="lazy" loading="lazy"
@ -455,11 +460,11 @@ export default function AutoComplete({
size={20} size={20}
/> />
)} )}
{`:${ <span style={{ paddingLeft: "4px" }}>{`:${
match instanceof CustomEmoji match instanceof CustomEmoji
? match.name ? match.name
: match : match
}:`} }:`}</span>
</div> </div>
{match instanceof CustomEmoji && {match instanceof CustomEmoji &&
match.parent.type == "Server" && ( match.parent.type == "Server" && (