Commit d5a7607b authored by Devin B's avatar Devin B

updated

parent 82cf4e3e
...@@ -10,9 +10,12 @@ import { Linking } from 'react-native'; ...@@ -10,9 +10,12 @@ import { Linking } from 'react-native';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false, const [selectedSymptoms, setSelectedSymptoms] = useState({
symptom2: false, symptom1: false, symptom2: false, symptom3: false, symptom4: false,
symptom3: false,}); symptom5: false, symptom6: false, symptom7: false, symptom8: false,
symptom9: false, symptom10: false, symptom11: false, symptom12: false,
symptom13: false, symptom14: false
});
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [videoPaused, setVideoPaused] = useState(true); const [videoPaused, setVideoPaused] = useState(true);
const [fullscreen, setFullscreen] = useState(false); const [fullscreen, setFullscreen] = useState(false);
...@@ -39,14 +42,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -39,14 +42,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
{ key: 'symptom7', text: 'Thigh muscle pain | කලවා මාංශ පේශි වේදනාව' }, { key: 'symptom7', text: 'Thigh muscle pain | කලවා මාංශ පේශි වේදනාව' },
{ key: 'symptom8', text: 'Groin pain | ඉකිලි වේදනාව' }, { key: 'symptom8', text: 'Groin pain | ඉකිලි වේදනාව' },
{ key: 'symptom9', text: 'Breast Pain |පියයුරු වේදනාව'}, { key: 'symptom9', text: 'Breast Pain |පියයුරු වේදනාව'},
{ key: 'symptom12', text: 'Side muscle pain | පැත්තේ මාංශ පේශි වේදනාව'}, { key: 'symptom10', text: 'Side muscle pain | පැත්තේ මාංශ පේශි වේදනාව'},
], ],
[ [
{ key: 'symptom10', text: 'Upper arm pain | ඉහළ අතේ වේදනාව' }, { key: 'symptom11', text: 'Upper arm pain | ඉහළ අතේ වේදනාව' },
{ key: 'symptom11', text: 'Heart burn | හදවත දැවෙනවා' }, { key: 'symptom12', text: 'Heart burn | හදවත දැවෙනවා' },
{ key: 'symptom12', text: 'Mouth and Nose ulcer’s | මුඛයේ සහ නාසයේ වණ'}, { key: 'symptom13', text: 'Mouth and Nose ulcer’s | මුඛයේ සහ නාසයේ වණ'},
{ key: 'symptom13', text: 'Back Pain |පිටුපස මාංශ පේශි වේදනාව'}, { key: 'symptom14', text: 'Back Pain |පිටුපස මාංශ පේශි වේදනාව'},
{ key: 'symptom14', text: 'Breast Pain |පියයුරු වේදනාව'},
], ],
// Add more groups as needed // Add more groups as needed
]; ];
...@@ -68,9 +71,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -68,9 +71,16 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
}; };
const handleSubmit = () => { const handleSubmit = () => {
// Handle the submission of symptoms // Checking for specific symptoms that lead to SKIN_RISK
console.log(selectedSymptoms); const skinRiskSymptoms = ['symptom12', 'symptom5', 'symptom4','symptom10', 'symptom8', 'symptom6'];
// Navigate or perform next steps const toSkinRisk = skinRiskSymptoms.some(symptom => selectedSymptoms[symptom]);
// Navigate based on condition
if (toSkinRisk) {
navigation.navigate(ROUTES.SKIN_RISK);
} else {
navigation.navigate(ROUTES.SKIN_UPLOAD);
}
}; };
const toggleFullscreen = () => { const toggleFullscreen = () => {
...@@ -175,7 +185,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -175,7 +185,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<Button <Button
title="Continue for more information" title="Continue for more information"
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_RISK)} onPress={handleSubmit}
/> />
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
......
...@@ -143,7 +143,7 @@ const Camera = ({ navigation }) => { ...@@ -143,7 +143,7 @@ const Camera = ({ navigation }) => {
<Button <Button
title="Continue for more information" title="Continue for more information"
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_VIDEO)} onPress={() => navigation.navigate(ROUTES.SKIN_VIDEO2)}
/> />
</View> </View>
</View> </View>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment