Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
EmidWife-New
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-24-005
EmidWife-New
Commits
4d356d8d
Commit
4d356d8d
authored
May 15, 2024
by
Malsha Jayakody
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge all components
parent
875f4af0
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
498 additions
and
461 deletions
+498
-461
package-lock.json
package-lock.json
+1
-1
src/constants/colors.js
src/constants/colors.js
+2
-1
src/navigations/BottomTabNavigator.js
src/navigations/BottomTabNavigator.js
+5
-5
src/screens/auth/Register.js
src/screens/auth/Register.js
+70
-29
src/screens/home/game/GameLevelPage.js
src/screens/home/game/GameLevelPage.js
+3
-1
src/screens/home/game/MainDetailsFormInSinhala.js
src/screens/home/game/MainDetailsFormInSinhala.js
+2
-1
src/screens/home/game/QuestionsInEnglish.js
src/screens/home/game/QuestionsInEnglish.js
+171
-171
src/screens/home/game/QuestionsInShinhala.js
src/screens/home/game/QuestionsInShinhala.js
+171
-171
src/screens/home/game/QuizOptions.js
src/screens/home/game/QuizOptions.js
+3
-3
src/screens/home/game/QuizScore.js
src/screens/home/game/QuizScore.js
+1
-22
src/screens/home/game/WelcomeGame.js
src/screens/home/game/WelcomeGame.js
+3
-3
src/screens/home/game/game02/level01.js
src/screens/home/game/game02/level01.js
+1
-0
src/screens/home/game/game02/level02.js
src/screens/home/game/game02/level02.js
+1
-0
src/screens/home/game/game02/level03.js
src/screens/home/game/game02/level03.js
+1
-0
src/screens/home/game/game02/level04.js
src/screens/home/game/game02/level04.js
+4
-3
src/screens/home/game/game02/level05.js
src/screens/home/game/game02/level05.js
+4
-3
src/screens/home/game/game02/level06.js
src/screens/home/game/game02/level06.js
+5
-4
src/screens/home/game/game02/level07.js
src/screens/home/game/game02/level07.js
+15
-7
src/services/auth/index.js
src/services/auth/index.js
+33
-34
src/services/games/index.js
src/services/games/index.js
+1
-1
yarn.lock
yarn.lock
+1
-1
No files found.
package-lock.json
View file @
4d356d8d
...
...
@@ -14807,7 +14807,7 @@
"version"
:
"5.0.4"
,
"resolved"
:
"https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz"
,
"integrity"
:
"sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw=="
,
"dev
Optional
"
:
true
,
"dev"
:
true
,
"bin"
:
{
"tsc"
:
"bin/tsc"
,
"tsserver"
:
"bin/tsserver"
...
...
src/constants/colors.js
View file @
4d356d8d
...
...
@@ -9,7 +9,7 @@ export default {
gray
:
'
#666666
'
,
grayLight
:
'
#ccc
'
,
black
:
'
#0a0a0a
'
,
blue
:
'
#ADC4CE
'
,
blue
:
'
#ADC4CE
'
,
navyBlue
:
'
#000080
'
,
purple
:
'
#DFCCFB
'
,
light_purple
:
'
#D9ACF5
'
,
...
...
@@ -20,4 +20,5 @@ export default {
pastalBlue
:
'
#D2E9E9
'
,
purple_new
:
'
#AC87C5
'
,
pink_new
:
'
#FF8080
'
,
pastal_blue
:
'
#7469B6
'
,
};
src/navigations/BottomTabNavigator.js
View file @
4d356d8d
...
...
@@ -38,9 +38,9 @@ function BottomTabNavigator() {
);
}
else
if
(
route
.
name
===
ROUTES
.
SKIN_WELCOME
)
{
return
focused
?
(
<
Icon
name
=
"
home
"
size
=
{
22
}
color
=
{
color
}
/
>
<
Icon
name
=
"
pulse-sharp
"
size
=
{
22
}
color
=
{
color
}
/
>
)
:
(
<
Icon
name
=
"
hom
e-outline
"
size
=
{
22
}
color
=
{
color
}
/
>
<
Icon
name
=
"
puls
e-outline
"
size
=
{
22
}
color
=
{
color
}
/
>
);
}
else
if
(
route
.
name
===
ROUTES
.
EXERCISE_HOME
)
{
return
focused
?
(
...
...
@@ -115,9 +115,9 @@ const styles = StyleSheet.create({
backgroundColor
:
'
rgba(255,255,255,0.1)
'
,
borderTopWidth
:
0
,
borderColor
:
COLORS
.
white
,
bottom
:
5
,
right
:
1
0
,
left
:
1
0
,
bottom
:
0
,
right
:
0
,
left
:
0
,
height
:
58
,
},
mr7
:
{
...
...
src/screens/auth/Register.js
View file @
4d356d8d
...
...
@@ -8,58 +8,98 @@ import {
TouchableOpacity
,
KeyboardAvoidingView
,
ScrollView
,
ToastAndroid
ToastAndroid
,
}
from
'
react-native
'
;
import
LinearGradient
from
'
react-native-linear-gradient
'
;
import
{
COLORS
,
ROUTES
}
from
'
../../constants
'
;
import
{
COLORS
,
ROUTES
}
from
'
../../constants
'
;
import
Logo
from
'
../../assets/icons/mother.svg
'
;
import
{
Formik
}
from
'
formik
'
;
import
{
signup
}
from
'
../../services/auth/index
'
;
import
{
Formik
}
from
'
formik
'
;
import
{
signup
}
from
'
../../services/auth/index
'
;
const
Register
=
({
navigation
})
=>
{
const
onSubmit
=
async
(
values
)
=>
{
let
respond
=
await
signup
(
values
.
name
,
values
.
password
,
values
.
email
,
values
.
age
,
values
.
week
);
console
.
log
(
"
dataset3
"
,
respond
.
data
)
if
(
respond
.
data
.
success
===
true
){
console
.
log
(
"
dataset
"
)
navigation
.
navigate
(
ROUTES
.
HOME
)
const
Register
=
({
navigation
})
=>
{
const
onSubmit
=
async
values
=>
{
let
respond
=
await
signup
(
values
.
name
,
values
.
password
,
values
.
email
,
values
.
age
,
values
.
week
,
);
console
.
log
(
'
dataset3
'
,
respond
.
data
);
if
(
respond
.
data
.
success
===
true
)
{
console
.
log
(
'
dataset
'
);
navigation
.
navigate
(
ROUTES
.
HOME
);
ToastAndroid
.
show
(
'
Login success
'
,
ToastAndroid
.
SHORT
);
}
else
{
}
else
{
ToastAndroid
.
show
(
'
Network or details not clear !
'
,
ToastAndroid
.
SHORT
);
}
};
return
(
<
KeyboardAvoidingView
style
=
{{
flex
:
1
}}
>
<
ScrollView
contentContainerStyle
=
{{
flexGrow
:
1
}}
bounces
=
{
false
}
>
<
KeyboardAvoidingView
style
=
{{
flex
:
1
}}
>
<
ScrollView
contentContainerStyle
=
{{
flexGrow
:
1
}}
bounces
=
{
false
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wFull
}
>
<
Formik
initialValues
=
{{
email
:
''
,
password
:
''
,
name
:
''
,
age
:
''
,
week
:
''
}}
onSubmit
=
{
values
=>
onSubmit
(
values
)}
>
{({
handleChange
,
handleBlur
,
handleSubmit
,
values
})
=>
(
initialValues
=
{{
email
:
''
,
password
:
''
,
name
:
''
,
age
:
''
,
week
:
''
,
}}
onSubmit
=
{
values
=>
onSubmit
(
values
)}
>
{({
handleChange
,
handleBlur
,
handleSubmit
,
values
})
=>
(
<>
<
View
style
=
{
styles
.
row
}
>
<
Logo
width
=
{
55
}
height
=
{
55
}
style
=
{
styles
.
mr7
}
/
>
<
Text
style
=
{
styles
.
brandName
}
>
EmidWife
<
/Text
>
<
/View
>
<
Text
style
=
{
styles
.
loginContinueTxt
}
>
Register
to
continue
<
/Text
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Name
"
onChangeText
=
{
handleChange
(
'
name
'
)}
value
=
{
values
.
name
}
/
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Email
"
onChangeText
=
{
handleChange
(
'
email
'
)}
value
=
{
values
.
email
}
/
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Password
"
onChangeText
=
{
handleChange
(
'
password
'
)}
value
=
{
values
.
password
}
/
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Age
"
onChangeText
=
{
handleChange
(
'
age
'
)}
value
=
{
values
.
age
}
/
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Week
"
onChangeText
=
{
handleChange
(
'
week
'
)}
value
=
{
values
.
week
}
/
>
<
Text
style
=
{
styles
.
loginContinueTxt
}
>
Register
to
continue
<
/Text
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Name
"
onChangeText
=
{
handleChange
(
'
name
'
)}
value
=
{
values
.
name
}
/
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Email
"
onChangeText
=
{
handleChange
(
'
email
'
)}
value
=
{
values
.
email
}
/
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Password
"
onChangeText
=
{
handleChange
(
'
password
'
)}
value
=
{
values
.
password
}
/
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Age
"
onChangeText
=
{
handleChange
(
'
age
'
)}
value
=
{
values
.
age
}
/
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Week
"
onChangeText
=
{
handleChange
(
'
week
'
)}
value
=
{
values
.
week
}
/
>
<
View
style
=
{
styles
.
loginBtnWrapper
}
>
<
LinearGradient
colors
=
{[
COLORS
.
gradientForm
,
COLORS
.
bgColor
]}
style
=
{
styles
.
linearGradient
}
start
=
{{
y
:
0.0
,
x
:
0.0
}}
end
=
{{
y
:
1.0
,
x
:
0.0
}}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
loginBtn
}
onPress
=
{
handleSubmit
}
>
start
=
{{
y
:
0.0
,
x
:
0.0
}}
end
=
{{
y
:
1.0
,
x
:
0.0
}}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
loginBtn
}
onPress
=
{
handleSubmit
}
>
<
Text
style
=
{
styles
.
loginText
}
>
Sign
Up
<
/Text
>
<
/TouchableOpacity
>
<
/LinearGradient
>
...
...
@@ -114,6 +154,7 @@ const styles = StyleSheet.create({
borderRadius
:
12
,
height
:
45
,
paddingVertical
:
0
,
color
:
COLORS
.
black
,
},
// Login Btn Styles
loginBtnWrapper
:
{
...
...
src/screens/home/game/GameLevelPage.js
View file @
4d356d8d
...
...
@@ -27,7 +27,9 @@ const GameLevelPage = ({route, navigation}) => {
<
/View
>
<
View
style
=
{
styles
.
diamondContainer
}
>
<
View
style
=
{
styles
.
innerCircle
}
>
<
Text
style
=
{
styles
.
scoreText
}
>
{
predictedGameLevel
}
<
/Text
>
<
Text
style
=
{
styles
.
scoreText
}
>
{
predictedGameLevel
===
0
?
'
2
'
:
predictedGameLevel
}
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
...
...
src/screens/home/game/MainDetailsFormInSinhala.js
View file @
4d356d8d
...
...
@@ -152,6 +152,7 @@ const MainDetailsFormInSinhala = ({navigation}) => {
onChangeText
=
{
text
=>
setAge
(
text
)}
// Use setAge for the age field
keyboardType
=
"
numeric
"
// Set keyboardType appropriately
value
=
{
age
}
required
/>
<
/View
>
<
View
style
=
{{
marginTop
:
15
}}
>
...
...
@@ -243,7 +244,7 @@ const MainDetailsFormInSinhala = ({navigation}) => {
value
=
{
previousChildBirthExperiences
}
/
>
<
/View
>
<
View
style
=
{{
marginTop
:
5
5
}}
>
<
View
style
=
{{
marginTop
:
3
5
}}
>
<
TouchableOpacity
style
=
{{
backgroundColor
:
COLORS
.
normal_purple
,
...
...
src/screens/home/game/QuestionsInEnglish.js
View file @
4d356d8d
...
...
@@ -47,7 +47,7 @@ const QuestionInEnglishPage = ({navigation, route}) => {
const
loadData
=
()
=>
{
axios
// .get('http://192.168.8.161:8070/api/quiz/all_english')
.
get
(
'
http://1
0.0.2.2:8070
/api/quiz/all_english
'
)
.
get
(
'
http://1
6.16.97.48
/api/quiz/all_english
'
)
.
then
(
response
=>
{
// console.log(response.data);
setQuestions
(
response
.
data
.
data
);
...
...
@@ -99,10 +99,11 @@ const QuestionInEnglishPage = ({navigation, route}) => {
<
ActivityIndicator
size
=
{
150
}
color
=
{
COLORS
.
dark_purple
}
/
>
<
/View
>
)
:
(
<
ScrollView
style
=
{
styles
.
container
}
>
<
LinearGradient
style
=
{{
flex
:
1
,
width
:
'
100%
'
,
height
:
'
100%
'
,
}}
colors
=
{[
COLORS
.
white
,
'
#FDCEDF
'
]}
>
{
questions
...
...
@@ -129,8 +130,8 @@ const QuestionInEnglishPage = ({navigation, route}) => {
borderColor
:
'
#FFC107
'
,
// Add this line to set the border color
borderWidth
:
3
,
borderRadius
:
17
,
marginTop
:
10
,
padding
:
14
,
marginTop
:
5
,
padding
:
12
,
}}
>
<
View
style
=
{{
...
...
@@ -142,7 +143,7 @@ const QuestionInEnglishPage = ({navigation, route}) => {
color
:
'
black
'
,
fontSize
:
15
,
fontWeight
:
'
bold
'
,
marginTop
:
16
,
marginTop
:
10
,
}}
>
{
question
.
question
}
<
/Text
>
...
...
@@ -150,8 +151,8 @@ const QuestionInEnglishPage = ({navigation, route}) => {
<
View
style
=
{{
marginTop
:
30
,
gap
:
15
,
marginBottom
:
1
5
,
gap
:
2
,
marginBottom
:
5
,
color
:
'
black
'
,
marginRight
:
25
,
}}
>
...
...
@@ -287,7 +288,6 @@ const QuestionInEnglishPage = ({navigation, route}) => {
)}
<
/View
>
<
/LinearGradient
>
<
/ScrollView
>
)}
<
/
>
);
...
...
src/screens/home/game/QuestionsInShinhala.js
View file @
4d356d8d
...
...
@@ -47,7 +47,7 @@ const QuestionInSinhalaPage = ({navigation, route}) => {
const
loadData
=
()
=>
{
axios
// .get('http://192.168.8.161:8070/api/quiz/all_sinhala')
.
get
(
'
http://1
0.0.2.2:8070
/api/quiz/all_sinhala
'
)
.
get
(
'
http://1
6.16.97.48
/api/quiz/all_sinhala
'
)
.
then
(
response
=>
{
setQuestions
(
response
.
data
.
data
);
setIsLoading
(
false
);
...
...
@@ -95,10 +95,11 @@ const QuestionInSinhalaPage = ({navigation, route}) => {
<
ActivityIndicator
size
=
{
150
}
color
=
{
COLORS
.
dark_purple
}
/
>
<
/View
>
)
:
(
<
ScrollView
style
=
{
styles
.
container
}
>
<
LinearGradient
style
=
{{
flex
:
1
,
width
:
'
100%
'
,
height
:
'
100%
'
,
}}
colors
=
{[
COLORS
.
white
,
'
#FDCEDF
'
]}
>
{
questions
...
...
@@ -125,8 +126,8 @@ const QuestionInSinhalaPage = ({navigation, route}) => {
borderColor
:
'
#FFC107
'
,
// Add this line to set the border color
borderWidth
:
3
,
borderRadius
:
17
,
marginTop
:
10
,
padding
:
14
,
marginTop
:
5
,
padding
:
12
,
}}
>
<
View
style
=
{{
...
...
@@ -138,7 +139,7 @@ const QuestionInSinhalaPage = ({navigation, route}) => {
color
:
'
black
'
,
fontSize
:
15
,
fontWeight
:
'
bold
'
,
marginTop
:
16
,
marginTop
:
10
,
}}
>
{
question
.
question
}
<
/Text
>
...
...
@@ -146,8 +147,8 @@ const QuestionInSinhalaPage = ({navigation, route}) => {
<
View
style
=
{{
marginTop
:
30
,
gap
:
10
,
marginBottom
:
1
5
,
gap
:
2
,
marginBottom
:
5
,
color
:
'
black
'
,
marginRight
:
25
,
}}
>
...
...
@@ -283,7 +284,6 @@ const QuestionInSinhalaPage = ({navigation, route}) => {
)}
<
/View
>
<
/LinearGradient
>
<
/ScrollView
>
)}
<
/
>
);
...
...
src/screens/home/game/QuizOptions.js
View file @
4d356d8d
...
...
@@ -39,7 +39,7 @@ const QuizOptionsPage = ({navigation}) => {
<
Text
style
=
{{
display
:
'
flex
'
,
color
:
'
#DC143C
'
,
color
:
COLORS
.
navyBlue
,
fontSize
:
20
,
fontWeight
:
'
bold
'
,
marginBottom
:
25
,
...
...
@@ -87,7 +87,7 @@ const QuizOptionsPage = ({navigation}) => {
<
View
style
=
{{
marginTop
:
40
}}
>
<
TouchableOpacity
style
=
{{
backgroundColor
:
COLORS
.
p
ink_new
,
backgroundColor
:
COLORS
.
p
astal_blue
,
height
:
50
,
marginBottom
:
20
,
justifyContent
:
'
center
'
,
...
...
@@ -108,7 +108,7 @@ const QuizOptionsPage = ({navigation}) => {
<
View
style
=
{{
marginTop
:
7
}}
>
<
TouchableOpacity
style
=
{{
backgroundColor
:
COLORS
.
p
ink_new
,
backgroundColor
:
COLORS
.
p
astal_blue
,
height
:
50
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
...
...
src/screens/home/game/QuizScore.js
View file @
4d356d8d
...
...
@@ -41,7 +41,6 @@ const QuizScoreDisplayPage = ({route, navigation}) => {
const
musicKeys
=
Object
.
keys
(
musicFields
);
const
randomIndex
=
Math
.
floor
(
Math
.
random
()
*
musicKeys
.
length
);
musicFields
[
musicKeys
[
randomIndex
]]
=
1
;
console
.
log
(
musicFields
,
'
musicFields
'
);
try
{
const
response
=
await
gameLevelPredict
(
formData
.
age
,
// Assuming formData contains 'age'
...
...
@@ -60,27 +59,7 @@ const QuizScoreDisplayPage = ({route, navigation}) => {
musicFields
.
music_name_e
,
musicFields
.
music_name_f
,
);
console
.
log
(
formData
.
age
,
'
age
'
);
console
.
log
(
formData
.
depression_level
,
'
depression_level
'
);
console
.
log
(
formData
.
previous_child_birth_experiences
,
'
previous_child_birth_experiences
'
,
);
console
.
log
(
formData
.
marital_status_divorced
,
'
marital_status_divorced
'
);
console
.
log
(
formData
.
marital_status_married
,
'
marital_status_married
'
);
console
.
log
(
formData
.
marital_status_single
,
'
marital_status_single
'
);
console
.
log
(
formData
.
family_background_bad
,
'
family_background_bad
'
);
console
.
log
(
formData
.
family_background_good
,
'
family_background_good
'
);
console
.
log
(
formData
.
family_background_normal
,
'
family_background_normal
'
,
);
console
.
log
(
musicFields
.
music_name_a
,
'
a
'
);
console
.
log
(
musicFields
.
music_name_b
,
'
b
'
);
console
.
log
(
musicFields
.
music_name_c
,
'
c
'
);
console
.
log
(
musicFields
.
music_name_d
,
'
d
'
);
console
.
log
(
musicFields
.
music_name_e
,
'
e
'
);
console
.
log
(
musicFields
.
music_name_f
,
'
f
'
);
console
.
log
(
response
.
data
.
prediction
,
'
response.data.prediction
'
);
if
(
response
&&
response
.
data
&&
response
.
data
.
prediction
)
{
console
.
log
(
'
API call successful with response:
'
,
response
.
data
);
const
predictedGameLevel
=
parseInt
(
...
...
src/screens/home/game/WelcomeGame.js
View file @
4d356d8d
...
...
@@ -17,8 +17,8 @@ const WelcomePageGame = ({navigation}) => {
<
Image
source
=
{
IMGS
.
game_img_1
}
style
=
{{
height
:
40
0
,
width
:
21
0
,
height
:
36
0
,
width
:
19
0
,
borderRadius
:
20
,
position
:
'
absolute
'
,
top
:
2
,
...
...
@@ -36,7 +36,7 @@ const WelcomePageGame = ({navigation}) => {
style
=
{{
paddingHorizontal
:
22
,
position
:
'
absolute
'
,
top
:
4
5
0
,
top
:
4
1
0
,
width
:
'
100%
'
,
}}
>
<
Text
...
...
src/screens/home/game/game02/level01.js
View file @
4d356d8d
...
...
@@ -179,6 +179,7 @@ const Game02Level01 = ({navigation, route}) => {
},
},
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
},
0
);
}
else
{
...
...
src/screens/home/game/game02/level02.js
View file @
4d356d8d
...
...
@@ -110,6 +110,7 @@ const CravingsPuzzleGame02Level02 = ({navigation}) => {
},
},
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
},
0
);
}
else
{
...
...
src/screens/home/game/game02/level03.js
View file @
4d356d8d
...
...
@@ -151,6 +151,7 @@ const PuzzleGame02Level03 = ({navigation}) => {
},
},
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
setGuess
([]);
}
else
{
Alert
.
alert
(
'
Try Again
'
,
"
That's not a match. Keep trying!
"
);
...
...
src/screens/home/game/game02/level04.js
View file @
4d356d8d
...
...
@@ -110,6 +110,7 @@ const Game02Level04 = ({navigation}) => {
},
},
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
else
if
(
foundLadyItem
)
{
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
...
...
@@ -259,7 +260,7 @@ const styles = StyleSheet.create({
button
:
{
padding
:
10
,
backgroundColor
:
'
#056676
'
,
// marginBottom: 7
5,
borderRadius
:
5
,
},
playerImage
:
{
width
:
'
100%
'
,
// Adjust as needed
...
...
@@ -289,10 +290,10 @@ const styles = StyleSheet.create({
top
:
1
,
},
buttonLeft
:
{
left
:
20
0
,
left
:
13
0
,
},
buttonRight
:
{
right
:
7
0
,
right
:
13
0
,
},
buttonDown
:
{
bottom
:
1
,
...
...
src/screens/home/game/game02/level05.js
View file @
4d356d8d
...
...
@@ -111,6 +111,7 @@ const Game02Level05 = ({navigation}) => {
},
},
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
else
if
(
foundLadyItem
)
{
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
...
...
@@ -259,7 +260,7 @@ const styles = StyleSheet.create({
button
:
{
padding
:
10
,
backgroundColor
:
'
#046582
'
,
// marginBottom: 7
5,
borderRadius
:
5
,
},
playerImage
:
{
width
:
'
100%
'
,
// Adjust as needed
...
...
@@ -289,10 +290,10 @@ const styles = StyleSheet.create({
top
:
1
,
},
buttonLeft
:
{
left
:
20
0
,
left
:
14
0
,
},
buttonRight
:
{
right
:
7
0
,
right
:
14
0
,
},
buttonDown
:
{
bottom
:
1
,
...
...
src/screens/home/game/game02/level06.js
View file @
4d356d8d
...
...
@@ -114,6 +114,7 @@ const Game02Level06 = ({navigation}) => {
},
},
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
else
if
(
foundLadyItem
)
{
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
...
...
@@ -261,8 +262,8 @@ const styles = StyleSheet.create({
},
button
:
{
padding
:
10
,
backgroundColor
:
'
#
056676
'
,
// marginBottom: 7
5,
backgroundColor
:
'
#
554994
'
,
borderRadius
:
5
,
},
playerImage
:
{
width
:
'
100%
'
,
// Adjust as needed
...
...
@@ -292,10 +293,10 @@ const styles = StyleSheet.create({
top
:
1
,
},
buttonLeft
:
{
left
:
20
0
,
left
:
13
0
,
},
buttonRight
:
{
right
:
7
0
,
right
:
13
0
,
},
buttonDown
:
{
bottom
:
1
,
...
...
src/screens/home/game/game02/level07.js
View file @
4d356d8d
...
...
@@ -111,7 +111,15 @@ const Game02Level07 = ({navigation}) => {
// Check if two baby items have been collected
if
(
collectedItems
.
length
+
1
>=
4
)
{
Alert
.
alert
(
'
Congratulations 🥳🥳! You won the game.
'
);
Alert
.
alert
(
'
Congratulations 🥳🥳! You won the game.
'
,
[
{
text
:
'
OK
'
,
onPress
:
()
=>
{
navigation
.
navigate
(
ROUTES
.
Game02ProgressLevel02
);
},
},
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
else
if
(
foundLadyItem
)
{
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
...
...
@@ -227,10 +235,10 @@ const styles = StyleSheet.create({
justifyContent
:
'
center
'
,
},
gameBoard
:
{
width
:
3
7
0
,
height
:
4
2
0
,
width
:
3
6
0
,
height
:
4
0
0
,
borderWidth
:
2
,
marginBottom
:
10
,
marginBottom
:
5
,
backgroundColor
:
'
#003333
'
,
borderColor
:
'
white
'
,
},
...
...
@@ -256,7 +264,7 @@ const styles = StyleSheet.create({
button
:
{
padding
:
10
,
backgroundColor
:
'
#056676
'
,
// marginBottom: 1
5,
borderRadius
:
5
,
},
playerImage
:
{
width
:
'
100%
'
,
// Adjust as needed
...
...
@@ -286,10 +294,10 @@ const styles = StyleSheet.create({
top
:
1
,
},
buttonLeft
:
{
left
:
20
0
,
left
:
13
0
,
},
buttonRight
:
{
right
:
7
0
,
right
:
13
0
,
},
buttonDown
:
{
bottom
:
1
,
...
...
src/services/auth/index.js
View file @
4d356d8d
import
axios
from
"
axios
"
;
const
BASE_PATH
=
'
http://1
0.0.2.2:8070
/api/mother
'
;
import
axios
from
'
axios
'
;
const
BASE_PATH
=
'
http://1
6.16.97.48
/api/mother
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
//signIn API Call
...
...
@@ -8,18 +8,17 @@ export let signin = async (email, password) => {
let
value
=
await
axios
.
post
(
BASE_PATH
+
'
/login
'
,
{
email
:
email
,
password
:
password
,
})
console
.
log
(
"
data1
"
,
value
.
data
)
});
console
.
log
(
'
data1
'
,
value
.
data
);
if
(
value
.
data
.
success
===
true
)
{
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
value
.
data
.
data
));
console
.
log
(
"
data
"
)
console
.
log
(
'
data
'
);
}
return
value
;
}
catch
(
error
)
{
return
error
return
error
;
}
}
};
//signIn API Call
export
let
signup
=
async
(
name
,
password
,
email
,
age
,
week
)
=>
{
...
...
@@ -30,14 +29,14 @@ export let signup = async (name, password, email, age, week) => {
email
:
email
,
age
:
age
,
week
:
week
,
})
console
.
log
(
"
data1
"
,
value
.
data
)
});
console
.
log
(
'
data1
'
,
value
.
data
);
if
(
value
.
data
.
success
===
true
)
{
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
value
.
data
.
data
));
console
.
log
(
"
data
"
)
console
.
log
(
'
data
'
);
}
return
value
;
}
catch
(
error
)
{
return
error
return
error
;
}
}
\ No newline at end of file
};
src/services/games/index.js
View file @
4d356d8d
import
axios
from
'
axios
'
;
// const BASE_PATH = 'http://10.0.2.2:8000';
const
BASE_PATH
=
'
http://172.104.34.100:8000
/
'
;
const
BASE_PATH
=
'
http://172.104.34.100:8000
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
//initialize payment API Call
...
...
yarn.lock
View file @
4d356d8d
...
...
@@ -7497,7 +7497,7 @@ typed-array-length@^1.0.6:
is-typed-array "^1.1.13"
possible-typed-array-names "^1.0.0"
"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>=4.9.5,
typescript@5.0.4:
typescript@5.0.4:
version "5.0.4"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz"
integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment