navigation.openDrawer is not a function react native
I think you should use the main navigation object obtained from useNavigation:
const navigation = useNavigation();
return (
<Button transparent onPress={() => navigation.openDrawer()}>
<Icon active name="menu"/>
</Button>
)