Fix sticker creator in our new typescriptified world

This commit is contained in:
Scott Nonnenberg
2022-06-13 18:48:07 -07:00
committed by GitHub
parent f2af71f8b5
commit 68f27c1c7c
15 changed files with 381 additions and 311 deletions

View File

@@ -155,6 +155,7 @@ export const StickerFrame = React.memo(
return () => {
removeRoot(root);
setEmojiPopperRoot(null);
document.removeEventListener('click', handleOutsideClick);
};
}
@@ -254,7 +255,7 @@ export const StickerFrame = React.memo(
</button>
)}
</PopperReference>
{emojiPickerOpen && onSetSkinTone && emojiPopperRoot
{emojiPickerOpen && emojiPopperRoot
? createPortal(
<Popper placement="bottom-start">
{({ ref, style }) => (