Invariant Violation: withNavigation can only be used on a view hierarchy of a navigator
I use a BottomTabNavigator and a StackNavigator from react-navigation for my app.
Recently I had to update the version of react navigation from v4 to v6 and thus change the way of implementing my navigation Stack and BottomTab to match v6 implementation.