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,
|
||||
ReturnType<typeof getCustomizeModalState>
|
||||
>(state => getCustomizeModalState(state));
|
||||
if (!customizeModalState) {
|
||||
throw new Error(
|
||||
'<SmartCustomizingPreferredReactionsModal> requires a modal'
|
||||
);
|
||||
}
|
||||
|
||||
const recentEmojis = useRecentEmojis();
|
||||
|
||||
|
@ -37,6 +32,12 @@ export function SmartCustomizingPreferredReactionsModal(): JSX.Element {
|
|||
getEmojiSkinTone(state)
|
||||
);
|
||||
|
||||
if (!customizeModalState) {
|
||||
throw new Error(
|
||||
'<SmartCustomizingPreferredReactionsModal> requires a modal'
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<CustomizingPreferredReactionsModal
|
||||
i18n={i18n}
|
||||
|
|
Loading…
Add table
Reference in a new issue