Cleanup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
e6d6ac6d44
commit
9aef41eab1
3 changed files with 10 additions and 6 deletions
|
@ -226,6 +226,10 @@ const EmojiPickerDropdown: React.FC<IEmojiPickerDropdown> = ({
|
||||||
}
|
}
|
||||||
}, [visible]);
|
}, [visible]);
|
||||||
|
|
||||||
|
useEffect(() => () => {
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
visible ? (
|
visible ? (
|
||||||
<RenderAfter update={update}>
|
<RenderAfter update={update}>
|
||||||
|
|
|
@ -16,7 +16,7 @@ export const messages = defineMessages({
|
||||||
emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' },
|
emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' },
|
||||||
});
|
});
|
||||||
|
|
||||||
const EmojiPickerDropdownWrapper = (
|
const EmojiPickerDropdownContainer = (
|
||||||
props: Pick<IEmojiPickerDropdown, 'onPickEmoji' | 'condensed'>,
|
props: Pick<IEmojiPickerDropdown, 'onPickEmoji' | 'condensed'>,
|
||||||
) => {
|
) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
@ -53,7 +53,7 @@ const EmojiPickerDropdownWrapper = (
|
||||||
document.addEventListener('click', handleDocClick, false);
|
document.addEventListener('click', handleDocClick, false);
|
||||||
document.addEventListener('touchend', handleDocClick, listenerOptions);
|
document.addEventListener('touchend', handleDocClick, listenerOptions);
|
||||||
|
|
||||||
return function cleanup() {
|
return () => {
|
||||||
document.removeEventListener('click', handleDocClick, false);
|
document.removeEventListener('click', handleDocClick, false);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
document.removeEventListener('touchend', handleDocClick, listenerOptions);
|
document.removeEventListener('touchend', handleDocClick, listenerOptions);
|
||||||
|
@ -93,4 +93,4 @@ const EmojiPickerDropdownWrapper = (
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export default EmojiPickerDropdownWrapper;
|
export default EmojiPickerDropdownContainer;
|
||||||
|
|
|
@ -631,6 +631,9 @@
|
||||||
"emoji_button.oh_no": "Oh no!",
|
"emoji_button.oh_no": "Oh no!",
|
||||||
"emoji_button.people": "People",
|
"emoji_button.people": "People",
|
||||||
"emoji_button.pick": "Pick an emoji…",
|
"emoji_button.pick": "Pick an emoji…",
|
||||||
|
"emoji_button.recent": "Frequently used",
|
||||||
|
"emoji_button.search": "Search…",
|
||||||
|
"emoji_button.search_results": "Search results",
|
||||||
"emoji_button.skins_1": "Default",
|
"emoji_button.skins_1": "Default",
|
||||||
"emoji_button.skins_2": "Light",
|
"emoji_button.skins_2": "Light",
|
||||||
"emoji_button.skins_3": "Medium-Light",
|
"emoji_button.skins_3": "Medium-Light",
|
||||||
|
@ -638,9 +641,6 @@
|
||||||
"emoji_button.skins_5": "Medium-Dark",
|
"emoji_button.skins_5": "Medium-Dark",
|
||||||
"emoji_button.skins_6": "Dark",
|
"emoji_button.skins_6": "Dark",
|
||||||
"emoji_button.skins_choose": "Choose default skin tone",
|
"emoji_button.skins_choose": "Choose default skin tone",
|
||||||
"emoji_button.recent": "Frequently used",
|
|
||||||
"emoji_button.search": "Search…",
|
|
||||||
"emoji_button.search_results": "Search results",
|
|
||||||
"emoji_button.symbols": "Symbols",
|
"emoji_button.symbols": "Symbols",
|
||||||
"emoji_button.travel": "Travel & Places",
|
"emoji_button.travel": "Travel & Places",
|
||||||
"empty_column.account_blocked": "You are blocked by @{accountUsername}.",
|
"empty_column.account_blocked": "You are blocked by @{accountUsername}.",
|
||||||
|
|
Loading…
Reference in a new issue