Respect "rules of hooks" in <SmartCustomizingPreferredReactionsModal>
This commit is contained in:
parent
4ef56667e2
commit
d94f1151b1
1 changed files with 6 additions and 5 deletions
|
@ -25,11 +25,6 @@ export function SmartCustomizingPreferredReactionsModal(): JSX.Element {
|
||||||
StateType,
|
StateType,
|
||||||
ReturnType<typeof getCustomizeModalState>
|
ReturnType<typeof getCustomizeModalState>
|
||||||
>(state => getCustomizeModalState(state));
|
>(state => getCustomizeModalState(state));
|
||||||
if (!customizeModalState) {
|
|
||||||
throw new Error(
|
|
||||||
'<SmartCustomizingPreferredReactionsModal> requires a modal'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const recentEmojis = useRecentEmojis();
|
const recentEmojis = useRecentEmojis();
|
||||||
|
|
||||||
|
@ -37,6 +32,12 @@ export function SmartCustomizingPreferredReactionsModal(): JSX.Element {
|
||||||
getEmojiSkinTone(state)
|
getEmojiSkinTone(state)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!customizeModalState) {
|
||||||
|
throw new Error(
|
||||||
|
'<SmartCustomizingPreferredReactionsModal> requires a modal'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomizingPreferredReactionsModal
|
<CustomizingPreferredReactionsModal
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
|
|
Loading…
Add table
Reference in a new issue