[FIX] Drawer failing to open/close on ProfileView (#3963)

This commit is contained in:
Gerzon Z 2022-03-25 10:35:25 -04:00 committed by GitHub
parent 3e5b833759
commit d5ac663199
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -13,7 +13,7 @@ interface IHeaderButtonCommon {
// Left
export const Drawer = React.memo(
({ navigation, testID, onPress = navigation?.toggleDrawer(), ...props }: IHeaderButtonCommon) => (
({ navigation, testID, onPress = () => navigation?.toggleDrawer(), ...props }: IHeaderButtonCommon) => (
<Container left>
<Item iconName='hamburguer' onPress={onPress} testID={testID} {...props} />
</Container>
@ -57,6 +57,8 @@ export const Preferences = React.memo(({ onPress, testID, ...props }: IHeaderBut
</Container>
));
export const Legal = React.memo(({ navigation, testID, onPress = navigation?.navigate('LegalView') }: IHeaderButtonCommon) => (
<More onPress={onPress} testID={testID} />
));
export const Legal = React.memo(
({ navigation, testID, onPress = () => navigation?.navigate('LegalView') }: IHeaderButtonCommon) => (
<More onPress={onPress} testID={testID} />
)
);

File diff suppressed because one or more lines are too long