Commit c53b5595 authored by Devin B's avatar Devin B

add_info

parent f7fabe12
...@@ -35,5 +35,10 @@ export default { ...@@ -35,5 +35,10 @@ export default {
SKIN_VIDEO3: 'Skin_Video3', SKIN_VIDEO3: 'Skin_Video3',
SKIN_VIDEO4: 'Skin_Video4', SKIN_VIDEO4: 'Skin_Video4',
SKIN_VIDEO5: 'Skin_Video5', SKIN_VIDEO5: 'Skin_Video5',
SKIN_INFO:'skin_info' SKIN_INFO:'skin_info',
SKIN_INFO2:'skin_info2',
SKIN_INFO3:'skin_info3',
SKIN_INFO4:'skin_info4',
SKIN_INFO5:'skin_info5',
SKIN_INFO6:'skin_info6'
}; };
...@@ -10,6 +10,11 @@ import AdditionalSymptoms3 from '../screens/home/skin/AdditionalSymptoms3'; ...@@ -10,6 +10,11 @@ import AdditionalSymptoms3 from '../screens/home/skin/AdditionalSymptoms3';
import AdditionalSymptoms4 from '../screens/home/skin/AdditionalSymptoms4'; import AdditionalSymptoms4 from '../screens/home/skin/AdditionalSymptoms4';
import AdditionalSymptoms5 from '../screens/home/skin/AdditionalSymptoms5'; import AdditionalSymptoms5 from '../screens/home/skin/AdditionalSymptoms5';
import Additionalinformation from '../screens/home/skin/information1'; import Additionalinformation from '../screens/home/skin/information1';
import Additionalinformation2 from '../screens/home/skin/skininformation2';
import Additionalinformation3 from '../screens/home/skin/skininfromation3';
import Additionalinformation4 from '../screens/home/skin/skininfromation4';
import Additionalinformation5 from '../screens/home/skin/skininformation5';
import Additionalinformation6 from '../screens/home/skin/skininformation6';
import {COLORS, ROUTES} from "../constants" import {COLORS, ROUTES} from "../constants"
const Stack = createStackNavigator(); const Stack = createStackNavigator();
...@@ -30,6 +35,11 @@ function SkinNavigator() { ...@@ -30,6 +35,11 @@ function SkinNavigator() {
<Stack.Screen name={ROUTES.SKIN_VIDEO4} component={AdditionalSymptoms4} /> <Stack.Screen name={ROUTES.SKIN_VIDEO4} component={AdditionalSymptoms4} />
<Stack.Screen name={ROUTES.SKIN_VIDEO5} component={AdditionalSymptoms5} /> <Stack.Screen name={ROUTES.SKIN_VIDEO5} component={AdditionalSymptoms5} />
<Stack.Screen name={ROUTES.SKIN_INFO} component={Additionalinformation} /> <Stack.Screen name={ROUTES.SKIN_INFO} component={Additionalinformation} />
<Stack.Screen name={ROUTES.SKIN_INFO2} component={Additionalinformation2} />
<Stack.Screen name={ROUTES.SKIN_INFO3} component={Additionalinformation3} />
<Stack.Screen name={ROUTES.SKIN_INFO4} component={Additionalinformation4} />
<Stack.Screen name={ROUTES.SKIN_INFO5} component={Additionalinformation5} />
<Stack.Screen name={ROUTES.SKIN_INFO6} component={Additionalinformation6} />
......
...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native'; ...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native';
import { Linking } from 'react-native'; import { Linking } from 'react-native';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen2 = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ const [selectedSymptoms, setSelectedSymptoms] = useState({
symptom1: false, symptom2: false, symptom3: false, symptom4: false, symptom1: false, symptom2: false, symptom3: false, symptom4: false,
symptom5: false, symptom6: false, symptom7: false, symptom8: false, symptom5: false, symptom6: false, symptom7: false, symptom8: false,
...@@ -77,7 +77,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -77,7 +77,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate based on condition // Navigate based on condition
if (toSkinRisk) { if (toSkinRisk) {
navigation.navigate(ROUTES.SKIN_RISK); navigation.navigate(ROUTES.SKIN_RISK, {origin: 'AdditionalSymptomsScreen2' });
} else { } else {
navigation.navigate(ROUTES.SKIN_INFO); navigation.navigate(ROUTES.SKIN_INFO);
} }
...@@ -460,4 +460,4 @@ const styles = StyleSheet.create({ ...@@ -460,4 +460,4 @@ const styles = StyleSheet.create({
// ... possibly other styles // ... possibly other styles
}); });
export default AdditionalSymptomsScreen; export default AdditionalSymptomsScreen2;
...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native'; ...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native';
import { Linking } from 'react-native'; import { Linking } from 'react-native';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen1 = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ const [selectedSymptoms, setSelectedSymptoms] = useState({
symptom1: false, symptom2: false, symptom3: false, symptom4: false, symptom1: false, symptom2: false, symptom3: false, symptom4: false,
symptom5: false, symptom6: false, symptom7: false, symptom8: false, symptom5: false, symptom6: false, symptom7: false, symptom8: false,
...@@ -71,9 +71,9 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -71,9 +71,9 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate based on condition // Navigate based on condition
if (toSkinRisk) { if (toSkinRisk) {
navigation.navigate(ROUTES.SKIN_RISK); navigation.navigate(ROUTES.SKIN_RISK, {origin: 'AdditionalSymptomsScreen1' });
} else { } else {
navigation.navigate(ROUTES.SKIN_INFO); navigation.navigate(ROUTES.SKIN_INFO2);
} }
}; };
...@@ -455,4 +455,4 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -455,4 +455,4 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
}); });
export default AdditionalSymptomsScreen; export default AdditionalSymptomsScreen1;
...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native'; ...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native';
import { Linking } from 'react-native'; import { Linking } from 'react-native';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen3 = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ const [selectedSymptoms, setSelectedSymptoms] = useState({
symptom1: false, symptom2: false, symptom3: false, symptom4: false, symptom1: false, symptom2: false, symptom3: false, symptom4: false,
symptom5: false, symptom6: false, symptom7: false, symptom8: false, symptom5: false, symptom6: false, symptom7: false, symptom8: false,
...@@ -67,7 +67,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -67,7 +67,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate based on condition // Navigate based on condition
if (toSkinRisk) { if (toSkinRisk) {
navigation.navigate(ROUTES.SKIN_RISK); navigation.navigate(ROUTES.SKIN_RISK, {origin: 'AdditionalSymptomsScreen3' });
} else { } else {
navigation.navigate(ROUTES.SKIN_INFO); navigation.navigate(ROUTES.SKIN_INFO);
} }
...@@ -451,4 +451,4 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -451,4 +451,4 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
}); });
export default AdditionalSymptomsScreen; export default AdditionalSymptomsScreen3;
...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native'; ...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native';
import { Linking } from 'react-native'; import { Linking } from 'react-native';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen4 = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ const [selectedSymptoms, setSelectedSymptoms] = useState({
symptom1: false, symptom2: false, symptom3: false, symptom4: false, symptom1: false, symptom2: false, symptom3: false, symptom4: false,
symptom5: false, symptom6: false, symptom7: false, symptom8: false, symptom5: false, symptom6: false, symptom7: false, symptom8: false,
...@@ -62,7 +62,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -62,7 +62,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate based on condition // Navigate based on condition
if (toSkinRisk) { if (toSkinRisk) {
navigation.navigate(ROUTES.SKIN_RISK); navigation.navigate(ROUTES.SKIN_RISK, {origin: 'AdditionalSymptomsScreen4' });
} else { } else {
navigation.navigate(ROUTES.SKIN_INFO); navigation.navigate(ROUTES.SKIN_INFO);
} }
...@@ -445,4 +445,4 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -445,4 +445,4 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// ... possibly other styles // ... possibly other styles
}); });
export default AdditionalSymptomsScreen; export default AdditionalSymptomsScreen4;
...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native'; ...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native';
import { Linking } from 'react-native'; import { Linking } from 'react-native';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen5 = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ const [selectedSymptoms, setSelectedSymptoms] = useState({
symptom1: false, symptom2: false, symptom3: false, symptom4: false, symptom1: false, symptom2: false, symptom3: false, symptom4: false,
symptom5: false, symptom6: false, symptom7: false, symptom8: false, symptom5: false, symptom6: false, symptom7: false, symptom8: false,
...@@ -155,7 +155,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -155,7 +155,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_INFO)} onPress={() => navigation.navigate(ROUTES.SKIN_INFO6)}
/> />
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
...@@ -381,4 +381,4 @@ const styles = StyleSheet.create({ ...@@ -381,4 +381,4 @@ const styles = StyleSheet.create({
// ... possibly other styles // ... possibly other styles
}); });
export default AdditionalSymptomsScreen; export default AdditionalSymptomsScreen5;
...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native'; ...@@ -9,7 +9,7 @@ import { Dimensions } from 'react-native';
import { Linking } from 'react-native'; import { Linking } from 'react-native';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen6 = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ const [selectedSymptoms, setSelectedSymptoms] = useState({
symptom1: false, symptom2: false, symptom3: false, symptom4: false, symptom1: false, symptom2: false, symptom3: false, symptom4: false,
symptom5: false, symptom6: false, symptom7: false, symptom8: false, symptom5: false, symptom6: false, symptom7: false, symptom8: false,
...@@ -60,7 +60,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -60,7 +60,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate based on condition // Navigate based on condition
if (toSkinRisk) { if (toSkinRisk) {
navigation.navigate(ROUTES.SKIN_RISK); navigation.navigate(ROUTES.SKIN_RISK, {origin: 'AdditionalSymptomsScreen6' });
} else { } else {
navigation.navigate(ROUTES.SKIN_INFO); navigation.navigate(ROUTES.SKIN_INFO);
} }
...@@ -443,4 +443,4 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -443,4 +443,4 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// ... possibly other styles // ... possibly other styles
}); });
export default AdditionalSymptomsScreen; export default AdditionalSymptomsScreen6;
...@@ -7,18 +7,14 @@ import Button from '../../../components/Button'; ...@@ -7,18 +7,14 @@ import Button from '../../../components/Button';
import Video from 'react-native-video'; import Video from 'react-native-video';
import { SafeAreaView } from 'react-native-safe-area-context'; import { SafeAreaView } from 'react-native-safe-area-context';
const RiskEvaluationScreen = ({ navigation }) => { const RiskEvaluationScreen = ({ navigation,route }) => {
const { origin } = route.params || {};
const [audioPaused, setAudioPaused] = useState(true); const [audioPaused, setAudioPaused] = useState(true);
const [progress, setProgress] = useState(0); const [progress, setProgress] = useState(0);
const audioRef = useRef(null); const audioRef = useRef(null);
const progressAnim = useRef(new Animated.Value(0)).current; const progressAnim = useRef(new Animated.Value(0)).current;
// Function to handle the continuation to the next screen
const handleContinue = () => {
// navigation.navigate('NextScreenRoute');
};
useEffect(() => { useEffect(() => {
if (audioPaused) { if (audioPaused) {
progressAnim.stopAnimation(); progressAnim.stopAnimation();
...@@ -40,13 +36,33 @@ const RiskEvaluationScreen = ({ navigation }) => { ...@@ -40,13 +36,33 @@ const RiskEvaluationScreen = ({ navigation }) => {
} }
}; };
const handleContinue = () => {
if (origin === 'AdditionalSymptomsScreen2') {
navigation.navigate(ROUTES.SKIN_INFO);
} else if (origin === 'AdditionalSymptomsScreen1') {
navigation.navigate(ROUTES.SKIN_INFO2);
}
else if (origin === 'AdditionalSymptomsScreen3') {
navigation.navigate(ROUTES.SKIN_INFO3);
}
else if (origin === 'AdditionalSymptomsScreen4') {
navigation.navigate(ROUTES.SKIN_INFO4);
}
else if (origin === 'AdditionalSymptomsScreen6') {
navigation.navigate(ROUTES.SKIN_INFO5);
}
// else {
// navigation.navigate(ROUTES.SKIN_INFO); // Default or fallback screen
// }
};
const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1716112518/audio/fzkd6v8lnmnsa4onm8sx.mp3"; const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1716112518/audio/fzkd6v8lnmnsa4onm8sx.mp3";
return ( return (
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<View style={styles.topContainer}> <View style={styles.topContainer}>
<Text style={styles.topicText}>Risk evaluation</Text> <Text style={styles.topicText}> Evaluated risk</Text>
<Text style={styles.descriptionText}> <Text style={styles.descriptionText}>
Your Condition Risk Level: High,Low will be displayed below Your Condition Risk Level: High,Low will be displayed below
</Text> </Text>
...@@ -90,7 +106,7 @@ const RiskEvaluationScreen = ({ navigation }) => { ...@@ -90,7 +106,7 @@ const RiskEvaluationScreen = ({ navigation }) => {
<Button <Button
title="What should I do next" title="What should I do next"
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_INFO)} onPress={handleContinue}
/> />
</View> </View>
</SafeAreaView> </SafeAreaView>
......
...@@ -145,16 +145,7 @@ const Camera = ({ navigation }) => { ...@@ -145,16 +145,7 @@ const Camera = ({ navigation }) => {
style={styles.nextButton} style={styles.nextButton}
onPress={handleContinue} onPress={handleContinue}
/> />
{/* <Button
title="Take your next step"
style={{
marginTop: 12,
width: "90%",
marginTop:43,
marginBottom:83
}}
onPress={() => navigation.navigate(ROUTES.SKIN_RISK)}
/> */}
</View> </View>
</View> </View>
); );
......
...@@ -183,7 +183,7 @@ const Additionalinformation = ({ navigation }) => { ...@@ -183,7 +183,7 @@ const Additionalinformation = ({ navigation }) => {
</View> </View>
<Button <Button
title="Continue for more information" title="Not sure ? Diagnose again"
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_WELCOME)} onPress={() => navigation.navigate(ROUTES.SKIN_WELCOME)}
/> />
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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