Skip to content

Commit

Permalink
nav types: Fix SettingsScreen's navigation-prop type
Browse files Browse the repository at this point in the history
We moved this screen a while ago from being one of the main tabs to
being a screen reached by stack navigation.  Since then, this type
has been invalid because 'settings' is not among the route keys in
the "main tabs" navigator.

Flow hasn't been giving us an error about it, because we haven't had
any actual value expressions around that have this type -- we never
look at the `navigation` prop in this component.  We do so in the
next commit, which caused me to notice this error.  Fix it.
  • Loading branch information
gnprice committed Jun 10, 2022
1 parent 4f0636d commit 5144d33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/settings/SettingsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useCallback } from 'react';
import type { Node } from 'react';

import type { RouteProp } from '../react-navigation';
import type { MainTabsNavigationProp } from '../main/MainTabsScreen';
import type { AppNavigationProp } from '../nav/AppNavigator';
import * as NavigationService from '../nav/NavigationService';
import { useGlobalSelector, useDispatch } from '../react-redux';
import { getGlobalSettings } from '../selectors';
Expand All @@ -27,7 +27,7 @@ import {
import { shouldUseInAppBrowser } from '../utils/openLink';

type Props = $ReadOnly<{|
navigation: MainTabsNavigationProp<'settings'>,
navigation: AppNavigationProp<'settings'>,
route: RouteProp<'settings', void>,
|}>;

Expand Down

0 comments on commit 5144d33

Please sign in to comment.