Skip to content

Commit

Permalink
chore: add back to data collection home on submission
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-mccombs committed Nov 17, 2020
1 parent d72f683 commit a0121e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions domains/DataCollection/Forms/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { View } from 'react-native';
import { Text, Button } from 'react-native-paper';

import { layout } from '../../../modules/theme';
import { layout, theme } from '../../../modules/theme';
import I18n from '../../../modules/i18n';

import IdentificationForm from './IdentificationForm';
Expand All @@ -22,7 +22,7 @@ const Forms = (props) => {
puenteForms,
surveyingUser, surveyingOrganization,
surveyee, setSurveyee,
customForm
customForm, navigateToRoot
} = props;

const [consent, setConsent] = useState(false);
Expand Down Expand Up @@ -87,6 +87,9 @@ const Forms = (props) => {
<Button mode="contained" onPress={navigateToGallery}>
<Text style={{ color: 'white' }}>{I18n.t('forms.viewGallery')}</Text>
</Button>
<Button mode="text" onPress={navigateToRoot} theme={theme} style={{ marginTop: 5 }}>
Return to Data Collection Home
</Button>
</View>
</View>
)}
Expand Down
3 changes: 2 additions & 1 deletion domains/DataCollection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ const DataCollection = ({ navigation }) => {
surveyee={surveyee}
setSurveyee={setSurveyee}
customForm={customForm}
setView={setView}
/>
</View>
)}
Expand Down Expand Up @@ -206,7 +207,7 @@ const DataCollection = ({ navigation }) => {
navigateToNewRecord={navigateToNewRecord}
surveyee={surveyee}
setSurveyee={setSurveyee}
setView={setView}
navigateToRoot={navigateToRoot}
/>
</View>
)}
Expand Down

0 comments on commit a0121e3

Please sign in to comment.