Навигация на другой экран из заголовка Native Navigation React

//pass in the navigation into the options like so and use it to navigate
options={({ navigation }) => ({
           title: 'Home',
              headerStyle: {
                backgroundColor: '#273469',
              },
              headerTintColor: '#EBF2FA',
              headerRight: () => (
                <Icon
                  onPress={() => navigation.navigate('ProfileScreen')}
                  name="edit"
                  type="material"
                />
              ),
            })}
Vast Vendace