diff --git a/native/community-creation/community-configuration.react.js b/native/community-creation/community-configuration.react.js --- a/native/community-creation/community-configuration.react.js +++ b/native/community-creation/community-configuration.react.js @@ -26,7 +26,10 @@ import Pill from '../components/pill.react.js'; import TextInput from '../components/text-input.react.js'; import { useCalendarQuery } from '../navigation/nav-selectors.js'; -import { type NavigationRoute } from '../navigation/route-names.js'; +import { + CommunityCreationMembersRouteName, + type NavigationRoute, +} from '../navigation/route-names.js'; import { useSelector } from '../redux/redux-utils.js'; import { useColors, useStyles } from '../themes/colors.js'; @@ -43,6 +46,8 @@ const styles = useStyles(unboundStyles); const colors = useColors(); + const { navigate } = props.navigation; + const dispatchActionPromise = useDispatchActionPromise(); const callNewThread = useServerCall(newThread); @@ -96,7 +101,9 @@ const newThreadResultPromise = callCreateNewCommunity(); dispatchActionPromise(newThreadActionTypes, newThreadResultPromise); await newThreadResultPromise; - }, [callCreateNewCommunity, dispatchActionPromise]); + + navigate(CommunityCreationMembersRouteName); + }, [callCreateNewCommunity, dispatchActionPromise, navigate]); const onCheckBoxPress = React.useCallback(() => { setErrorMessage(); diff --git a/native/community-creation/community-creation-members.react.js b/native/community-creation/community-creation-members.react.js new file mode 100644 --- /dev/null +++ b/native/community-creation/community-creation-members.react.js @@ -0,0 +1,18 @@ +// @flow + +import * as React from 'react'; + +import type { CommunityCreationNavigationProp } from './community-creation-navigator.react.js'; +import type { NavigationRoute } from '../navigation/route-names.js'; + +type Props = { + +navigation: CommunityCreationNavigationProp<'CommunityCreationMembers'>, + +route: NavigationRoute<'CommunityCreationMembers'>, +}; + +// eslint-disable-next-line no-unused-vars +function CommunityCreationMembers(props: Props): React.Node { + return null; +} + +export default CommunityCreationMembers; diff --git a/native/community-creation/community-creation-navigator.react.js b/native/community-creation/community-creation-navigator.react.js --- a/native/community-creation/community-creation-navigator.react.js +++ b/native/community-creation/community-creation-navigator.react.js @@ -8,11 +8,13 @@ import * as React from 'react'; import CommunityConfiguration from './community-configuration.react.js'; +import CommunityCreationMembers from './community-creation-members.react.js'; import type { RootNavigationProp } from '../navigation/root-navigator.react.js'; import { CommunityConfigurationRouteName, type ScreenParamList, type CommunityCreationParamList, + CommunityCreationMembersRouteName, } from '../navigation/route-names.js'; import { useColors } from '../themes/colors.js'; @@ -30,6 +32,10 @@ headerTitle: 'Create a community', }; +const communityCreationMembersOptions = { + headerTitle: 'Add members', +}; + type Props = { +navigation: RootNavigationProp<'CommunityCreation'>, ... @@ -57,6 +63,11 @@ component={CommunityConfiguration} options={communityConfigurationOptions} /> + ); } diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js --- a/native/navigation/route-names.js +++ b/native/navigation/route-names.js @@ -107,6 +107,7 @@ export const UsernameSelectionRouteName = 'UsernameSelection'; export const CommunityCreationRouteName = 'CommunityCreation'; export const CommunityConfigurationRouteName = 'CommunityConfiguration'; +export const CommunityCreationMembersRouteName = 'CommunityCreationMembers'; export const MessageSearchRouteName = 'MessageSearch'; export type RootParamList = { @@ -213,6 +214,7 @@ export type CommunityCreationParamList = { +CommunityConfiguration: void, + +CommunityCreationMembers: void, }; export type ScreenParamList = {