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
Expand all
Hide 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 @@
...
@@ -14807,7 +14807,7 @@
"version"
:
"5.0.4"
,
"version"
:
"5.0.4"
,
"resolved"
:
"https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz"
,
"resolved"
:
"https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz"
,
"integrity"
:
"sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw=="
,
"integrity"
:
"sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw=="
,
"dev
Optional
"
:
true
,
"dev"
:
true
,
"bin"
:
{
"bin"
:
{
"tsc"
:
"bin/tsc"
,
"tsc"
:
"bin/tsc"
,
"tsserver"
:
"bin/tsserver"
"tsserver"
:
"bin/tsserver"
...
...
src/constants/colors.js
View file @
4d356d8d
...
@@ -9,7 +9,7 @@ export default {
...
@@ -9,7 +9,7 @@ export default {
gray
:
'
#666666
'
,
gray
:
'
#666666
'
,
grayLight
:
'
#ccc
'
,
grayLight
:
'
#ccc
'
,
black
:
'
#0a0a0a
'
,
black
:
'
#0a0a0a
'
,
blue
:
'
#ADC4CE
'
,
blue
:
'
#ADC4CE
'
,
navyBlue
:
'
#000080
'
,
navyBlue
:
'
#000080
'
,
purple
:
'
#DFCCFB
'
,
purple
:
'
#DFCCFB
'
,
light_purple
:
'
#D9ACF5
'
,
light_purple
:
'
#D9ACF5
'
,
...
@@ -20,4 +20,5 @@ export default {
...
@@ -20,4 +20,5 @@ export default {
pastalBlue
:
'
#D2E9E9
'
,
pastalBlue
:
'
#D2E9E9
'
,
purple_new
:
'
#AC87C5
'
,
purple_new
:
'
#AC87C5
'
,
pink_new
:
'
#FF8080
'
,
pink_new
:
'
#FF8080
'
,
pastal_blue
:
'
#7469B6
'
,
};
};
src/navigations/BottomTabNavigator.js
View file @
4d356d8d
...
@@ -38,9 +38,9 @@ function BottomTabNavigator() {
...
@@ -38,9 +38,9 @@ function BottomTabNavigator() {
);
);
}
else
if
(
route
.
name
===
ROUTES
.
SKIN_WELCOME
)
{
}
else
if
(
route
.
name
===
ROUTES
.
SKIN_WELCOME
)
{
return
focused
?
(
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
)
{
}
else
if
(
route
.
name
===
ROUTES
.
EXERCISE_HOME
)
{
return
focused
?
(
return
focused
?
(
...
@@ -115,9 +115,9 @@ const styles = StyleSheet.create({
...
@@ -115,9 +115,9 @@ const styles = StyleSheet.create({
backgroundColor
:
'
rgba(255,255,255,0.1)
'
,
backgroundColor
:
'
rgba(255,255,255,0.1)
'
,
borderTopWidth
:
0
,
borderTopWidth
:
0
,
borderColor
:
COLORS
.
white
,
borderColor
:
COLORS
.
white
,
bottom
:
5
,
bottom
:
0
,
right
:
1
0
,
right
:
0
,
left
:
1
0
,
left
:
0
,
height
:
58
,
height
:
58
,
},
},
mr7
:
{
mr7
:
{
...
...
src/screens/auth/Register.js
View file @
4d356d8d
...
@@ -8,58 +8,98 @@ import {
...
@@ -8,58 +8,98 @@ import {
TouchableOpacity
,
TouchableOpacity
,
KeyboardAvoidingView
,
KeyboardAvoidingView
,
ScrollView
,
ScrollView
,
ToastAndroid
ToastAndroid
,
}
from
'
react-native
'
;
}
from
'
react-native
'
;
import
LinearGradient
from
'
react-native-linear-gradient
'
;
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
Logo
from
'
../../assets/icons/mother.svg
'
;
import
{
Formik
}
from
'
formik
'
;
import
{
Formik
}
from
'
formik
'
;
import
{
signup
}
from
'
../../services/auth/index
'
;
import
{
signup
}
from
'
../../services/auth/index
'
;
const
Register
=
({
navigation
})
=>
{
const
Register
=
({
navigation
})
=>
{
const
onSubmit
=
async
(
values
)
=>
{
const
onSubmit
=
async
values
=>
{
let
respond
=
await
signup
(
values
.
name
,
values
.
password
,
values
.
email
,
values
.
age
,
values
.
week
);
let
respond
=
await
signup
(
console
.
log
(
"
dataset3
"
,
respond
.
data
)
values
.
name
,
if
(
respond
.
data
.
success
===
true
){
values
.
password
,
console
.
log
(
"
dataset
"
)
values
.
email
,
navigation
.
navigate
(
ROUTES
.
HOME
)
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
);
ToastAndroid
.
show
(
'
Login success
'
,
ToastAndroid
.
SHORT
);
}
}
else
{
else
{
ToastAndroid
.
show
(
'
Network or details not clear !
'
,
ToastAndroid
.
SHORT
);
ToastAndroid
.
show
(
'
Network or details not clear !
'
,
ToastAndroid
.
SHORT
);
}
}
};
};
return
(
return
(
<
KeyboardAvoidingView
style
=
{{
flex
:
1
}}
>
<
KeyboardAvoidingView
style
=
{{
flex
:
1
}}
>
<
ScrollView
contentContainerStyle
=
{{
flexGrow
:
1
}}
bounces
=
{
false
}
>
<
ScrollView
contentContainerStyle
=
{{
flexGrow
:
1
}}
bounces
=
{
false
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
wFull
}
>
<
View
style
=
{
styles
.
wFull
}
>
<
Formik
<
Formik
initialValues
=
{{
email
:
''
,
password
:
''
,
name
:
''
,
age
:
''
,
week
:
''
}}
initialValues
=
{{
onSubmit
=
{
values
=>
onSubmit
(
values
)}
email
:
''
,
>
password
:
''
,
{({
handleChange
,
handleBlur
,
handleSubmit
,
values
})
=>
(
name
:
''
,
age
:
''
,
week
:
''
,
}}
onSubmit
=
{
values
=>
onSubmit
(
values
)}
>
{({
handleChange
,
handleBlur
,
handleSubmit
,
values
})
=>
(
<>
<>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
Logo
width
=
{
55
}
height
=
{
55
}
style
=
{
styles
.
mr7
}
/
>
<
Logo
width
=
{
55
}
height
=
{
55
}
style
=
{
styles
.
mr7
}
/
>
<
Text
style
=
{
styles
.
brandName
}
>
EmidWife
<
/Text
>
<
Text
style
=
{
styles
.
brandName
}
>
EmidWife
<
/Text
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
loginContinueTxt
}
>
Register
to
continue
<
/Text
>
<
Text
style
=
{
styles
.
loginContinueTxt
}
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Name
"
onChangeText
=
{
handleChange
(
'
name
'
)}
value
=
{
values
.
name
}
/
>
Register
to
continue
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Email
"
onChangeText
=
{
handleChange
(
'
email
'
)}
value
=
{
values
.
email
}
/
>
<
/Text
>
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Password
"
onChangeText
=
{
handleChange
(
'
password
'
)}
value
=
{
values
.
password
}
/
>
<
TextInput
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Age
"
onChangeText
=
{
handleChange
(
'
age
'
)}
value
=
{
values
.
age
}
/
>
style
=
{
styles
.
input
}
<
TextInput
style
=
{
styles
.
input
}
placeholder
=
"
Week
"
onChangeText
=
{
handleChange
(
'
week
'
)}
value
=
{
values
.
week
}
/
>
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
}
>
<
View
style
=
{
styles
.
loginBtnWrapper
}
>
<
LinearGradient
<
LinearGradient
colors
=
{[
COLORS
.
gradientForm
,
COLORS
.
bgColor
]}
colors
=
{[
COLORS
.
gradientForm
,
COLORS
.
bgColor
]}
style
=
{
styles
.
linearGradient
}
style
=
{
styles
.
linearGradient
}
start
=
{{
y
:
0.0
,
x
:
0.0
}}
start
=
{{
y
:
0.0
,
x
:
0.0
}}
end
=
{{
y
:
1.0
,
x
:
0.0
}}
>
end
=
{{
y
:
1.0
,
x
:
0.0
}}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
loginBtn
}
onPress
=
{
handleSubmit
}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
loginBtn
}
onPress
=
{
handleSubmit
}
>
<
Text
style
=
{
styles
.
loginText
}
>
Sign
Up
<
/Text
>
<
Text
style
=
{
styles
.
loginText
}
>
Sign
Up
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/LinearGradient
>
<
/LinearGradient
>
...
@@ -114,6 +154,7 @@ const styles = StyleSheet.create({
...
@@ -114,6 +154,7 @@ const styles = StyleSheet.create({
borderRadius
:
12
,
borderRadius
:
12
,
height
:
45
,
height
:
45
,
paddingVertical
:
0
,
paddingVertical
:
0
,
color
:
COLORS
.
black
,
},
},
// Login Btn Styles
// Login Btn Styles
loginBtnWrapper
:
{
loginBtnWrapper
:
{
...
...
src/screens/home/game/GameLevelPage.js
View file @
4d356d8d
...
@@ -27,7 +27,9 @@ const GameLevelPage = ({route, navigation}) => {
...
@@ -27,7 +27,9 @@ const GameLevelPage = ({route, navigation}) => {
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
diamondContainer
}
>
<
View
style
=
{
styles
.
diamondContainer
}
>
<
View
style
=
{
styles
.
innerCircle
}
>
<
View
style
=
{
styles
.
innerCircle
}
>
<
Text
style
=
{
styles
.
scoreText
}
>
{
predictedGameLevel
}
<
/Text
>
<
Text
style
=
{
styles
.
scoreText
}
>
{
predictedGameLevel
===
0
?
'
2
'
:
predictedGameLevel
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
...
...
src/screens/home/game/MainDetailsFormInSinhala.js
View file @
4d356d8d
...
@@ -152,6 +152,7 @@ const MainDetailsFormInSinhala = ({navigation}) => {
...
@@ -152,6 +152,7 @@ const MainDetailsFormInSinhala = ({navigation}) => {
onChangeText
=
{
text
=>
setAge
(
text
)}
// Use setAge for the age field
onChangeText
=
{
text
=>
setAge
(
text
)}
// Use setAge for the age field
keyboardType
=
"
numeric
"
// Set keyboardType appropriately
keyboardType
=
"
numeric
"
// Set keyboardType appropriately
value
=
{
age
}
value
=
{
age
}
required
/>
/>
<
/View
>
<
/View
>
<
View
style
=
{{
marginTop
:
15
}}
>
<
View
style
=
{{
marginTop
:
15
}}
>
...
@@ -243,7 +244,7 @@ const MainDetailsFormInSinhala = ({navigation}) => {
...
@@ -243,7 +244,7 @@ const MainDetailsFormInSinhala = ({navigation}) => {
value
=
{
previousChildBirthExperiences
}
value
=
{
previousChildBirthExperiences
}
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
marginTop
:
5
5
}}
>
<
View
style
=
{{
marginTop
:
3
5
}}
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{{
style
=
{{
backgroundColor
:
COLORS
.
normal_purple
,
backgroundColor
:
COLORS
.
normal_purple
,
...
...
src/screens/home/game/QuestionsInEnglish.js
View file @
4d356d8d
This diff is collapsed.
Click to expand it.
src/screens/home/game/QuestionsInShinhala.js
View file @
4d356d8d
This diff is collapsed.
Click to expand it.
src/screens/home/game/QuizOptions.js
View file @
4d356d8d
...
@@ -39,7 +39,7 @@ const QuizOptionsPage = ({navigation}) => {
...
@@ -39,7 +39,7 @@ const QuizOptionsPage = ({navigation}) => {
<
Text
<
Text
style
=
{{
style
=
{{
display
:
'
flex
'
,
display
:
'
flex
'
,
color
:
'
#DC143C
'
,
color
:
COLORS
.
navyBlue
,
fontSize
:
20
,
fontSize
:
20
,
fontWeight
:
'
bold
'
,
fontWeight
:
'
bold
'
,
marginBottom
:
25
,
marginBottom
:
25
,
...
@@ -87,7 +87,7 @@ const QuizOptionsPage = ({navigation}) => {
...
@@ -87,7 +87,7 @@ const QuizOptionsPage = ({navigation}) => {
<
View
style
=
{{
marginTop
:
40
}}
>
<
View
style
=
{{
marginTop
:
40
}}
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{{
style
=
{{
backgroundColor
:
COLORS
.
p
ink_new
,
backgroundColor
:
COLORS
.
p
astal_blue
,
height
:
50
,
height
:
50
,
marginBottom
:
20
,
marginBottom
:
20
,
justifyContent
:
'
center
'
,
justifyContent
:
'
center
'
,
...
@@ -108,7 +108,7 @@ const QuizOptionsPage = ({navigation}) => {
...
@@ -108,7 +108,7 @@ const QuizOptionsPage = ({navigation}) => {
<
View
style
=
{{
marginTop
:
7
}}
>
<
View
style
=
{{
marginTop
:
7
}}
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{{
style
=
{{
backgroundColor
:
COLORS
.
p
ink_new
,
backgroundColor
:
COLORS
.
p
astal_blue
,
height
:
50
,
height
:
50
,
justifyContent
:
'
center
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
alignItems
:
'
center
'
,
...
...
src/screens/home/game/QuizScore.js
View file @
4d356d8d
...
@@ -41,7 +41,6 @@ const QuizScoreDisplayPage = ({route, navigation}) => {
...
@@ -41,7 +41,6 @@ const QuizScoreDisplayPage = ({route, navigation}) => {
const
musicKeys
=
Object
.
keys
(
musicFields
);
const
musicKeys
=
Object
.
keys
(
musicFields
);
const
randomIndex
=
Math
.
floor
(
Math
.
random
()
*
musicKeys
.
length
);
const
randomIndex
=
Math
.
floor
(
Math
.
random
()
*
musicKeys
.
length
);
musicFields
[
musicKeys
[
randomIndex
]]
=
1
;
musicFields
[
musicKeys
[
randomIndex
]]
=
1
;
console
.
log
(
musicFields
,
'
musicFields
'
);
try
{
try
{
const
response
=
await
gameLevelPredict
(
const
response
=
await
gameLevelPredict
(
formData
.
age
,
// Assuming formData contains 'age'
formData
.
age
,
// Assuming formData contains 'age'
...
@@ -60,27 +59,7 @@ const QuizScoreDisplayPage = ({route, navigation}) => {
...
@@ -60,27 +59,7 @@ const QuizScoreDisplayPage = ({route, navigation}) => {
musicFields
.
music_name_e
,
musicFields
.
music_name_e
,
musicFields
.
music_name_f
,
musicFields
.
music_name_f
,
);
);
console
.
log
(
formData
.
age
,
'
age
'
);
console
.
log
(
response
.
data
.
prediction
,
'
response.data.prediction
'
);
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
'
);
if
(
response
&&
response
.
data
&&
response
.
data
.
prediction
)
{
if
(
response
&&
response
.
data
&&
response
.
data
.
prediction
)
{
console
.
log
(
'
API call successful with response:
'
,
response
.
data
);
console
.
log
(
'
API call successful with response:
'
,
response
.
data
);
const
predictedGameLevel
=
parseInt
(
const
predictedGameLevel
=
parseInt
(
...
...
src/screens/home/game/WelcomeGame.js
View file @
4d356d8d
...
@@ -17,8 +17,8 @@ const WelcomePageGame = ({navigation}) => {
...
@@ -17,8 +17,8 @@ const WelcomePageGame = ({navigation}) => {
<
Image
<
Image
source
=
{
IMGS
.
game_img_1
}
source
=
{
IMGS
.
game_img_1
}
style
=
{{
style
=
{{
height
:
40
0
,
height
:
36
0
,
width
:
21
0
,
width
:
19
0
,
borderRadius
:
20
,
borderRadius
:
20
,
position
:
'
absolute
'
,
position
:
'
absolute
'
,
top
:
2
,
top
:
2
,
...
@@ -36,7 +36,7 @@ const WelcomePageGame = ({navigation}) => {
...
@@ -36,7 +36,7 @@ const WelcomePageGame = ({navigation}) => {
style
=
{{
style
=
{{
paddingHorizontal
:
22
,
paddingHorizontal
:
22
,
position
:
'
absolute
'
,
position
:
'
absolute
'
,
top
:
4
5
0
,
top
:
4
1
0
,
width
:
'
100%
'
,
width
:
'
100%
'
,
}}
>
}}
>
<
Text
<
Text
...
...
src/screens/home/game/game02/level01.js
View file @
4d356d8d
...
@@ -179,6 +179,7 @@ const Game02Level01 = ({navigation, route}) => {
...
@@ -179,6 +179,7 @@ const Game02Level01 = ({navigation, route}) => {
},
},
},
},
]);
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
},
0
);
},
0
);
}
else
{
}
else
{
...
...
src/screens/home/game/game02/level02.js
View file @
4d356d8d
...
@@ -110,6 +110,7 @@ const CravingsPuzzleGame02Level02 = ({navigation}) => {
...
@@ -110,6 +110,7 @@ const CravingsPuzzleGame02Level02 = ({navigation}) => {
},
},
},
},
]);
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
},
0
);
},
0
);
}
else
{
}
else
{
...
...
src/screens/home/game/game02/level03.js
View file @
4d356d8d
...
@@ -151,6 +151,7 @@ const PuzzleGame02Level03 = ({navigation}) => {
...
@@ -151,6 +151,7 @@ const PuzzleGame02Level03 = ({navigation}) => {
},
},
},
},
]);
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
setGuess
([]);
setGuess
([]);
}
else
{
}
else
{
Alert
.
alert
(
'
Try Again
'
,
"
That's not a match. Keep trying!
"
);
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}) => {
...
@@ -110,6 +110,7 @@ const Game02Level04 = ({navigation}) => {
},
},
},
},
]);
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
}
else
if
(
foundLadyItem
)
{
}
else
if
(
foundLadyItem
)
{
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
...
@@ -259,7 +260,7 @@ const styles = StyleSheet.create({
...
@@ -259,7 +260,7 @@ const styles = StyleSheet.create({
button
:
{
button
:
{
padding
:
10
,
padding
:
10
,
backgroundColor
:
'
#056676
'
,
backgroundColor
:
'
#056676
'
,
// marginBottom: 7
5,
borderRadius
:
5
,
},
},
playerImage
:
{
playerImage
:
{
width
:
'
100%
'
,
// Adjust as needed
width
:
'
100%
'
,
// Adjust as needed
...
@@ -289,10 +290,10 @@ const styles = StyleSheet.create({
...
@@ -289,10 +290,10 @@ const styles = StyleSheet.create({
top
:
1
,
top
:
1
,
},
},
buttonLeft
:
{
buttonLeft
:
{
left
:
20
0
,
left
:
13
0
,
},
},
buttonRight
:
{
buttonRight
:
{
right
:
7
0
,
right
:
13
0
,
},
},
buttonDown
:
{
buttonDown
:
{
bottom
:
1
,
bottom
:
1
,
...
...
src/screens/home/game/game02/level05.js
View file @
4d356d8d
...
@@ -111,6 +111,7 @@ const Game02Level05 = ({navigation}) => {
...
@@ -111,6 +111,7 @@ const Game02Level05 = ({navigation}) => {
},
},
},
},
]);
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
}
else
if
(
foundLadyItem
)
{
}
else
if
(
foundLadyItem
)
{
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
...
@@ -259,7 +260,7 @@ const styles = StyleSheet.create({
...
@@ -259,7 +260,7 @@ const styles = StyleSheet.create({
button
:
{
button
:
{
padding
:
10
,
padding
:
10
,
backgroundColor
:
'
#046582
'
,
backgroundColor
:
'
#046582
'
,
// marginBottom: 7
5,
borderRadius
:
5
,
},
},
playerImage
:
{
playerImage
:
{
width
:
'
100%
'
,
// Adjust as needed
width
:
'
100%
'
,
// Adjust as needed
...
@@ -289,10 +290,10 @@ const styles = StyleSheet.create({
...
@@ -289,10 +290,10 @@ const styles = StyleSheet.create({
top
:
1
,
top
:
1
,
},
},
buttonLeft
:
{
buttonLeft
:
{
left
:
20
0
,
left
:
14
0
,
},
},
buttonRight
:
{
buttonRight
:
{
right
:
7
0
,
right
:
14
0
,
},
},
buttonDown
:
{
buttonDown
:
{
bottom
:
1
,
bottom
:
1
,
...
...
src/screens/home/game/game02/level06.js
View file @
4d356d8d
...
@@ -114,6 +114,7 @@ const Game02Level06 = ({navigation}) => {
...
@@ -114,6 +114,7 @@ const Game02Level06 = ({navigation}) => {
},
},
},
},
]);
]);
backgroundMusic
.
current
.
setVolume
(
0.0
);
}
}
}
else
if
(
foundLadyItem
)
{
}
else
if
(
foundLadyItem
)
{
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
...
@@ -261,8 +262,8 @@ const styles = StyleSheet.create({
...
@@ -261,8 +262,8 @@ const styles = StyleSheet.create({
},
},
button
:
{
button
:
{
padding
:
10
,
padding
:
10
,
backgroundColor
:
'
#
056676
'
,
backgroundColor
:
'
#
554994
'
,
// marginBottom: 7
5,
borderRadius
:
5
,
},
},
playerImage
:
{
playerImage
:
{
width
:
'
100%
'
,
// Adjust as needed
width
:
'
100%
'
,
// Adjust as needed
...
@@ -292,10 +293,10 @@ const styles = StyleSheet.create({
...
@@ -292,10 +293,10 @@ const styles = StyleSheet.create({
top
:
1
,
top
:
1
,
},
},
buttonLeft
:
{
buttonLeft
:
{
left
:
20
0
,
left
:
13
0
,
},
},
buttonRight
:
{
buttonRight
:
{
right
:
7
0
,
right
:
13
0
,
},
},
buttonDown
:
{
buttonDown
:
{
bottom
:
1
,
bottom
:
1
,
...
...
src/screens/home/game/game02/level07.js
View file @
4d356d8d
...
@@ -111,7 +111,15 @@ const Game02Level07 = ({navigation}) => {
...
@@ -111,7 +111,15 @@ const Game02Level07 = ({navigation}) => {
// Check if two baby items have been collected
// Check if two baby items have been collected
if
(
collectedItems
.
length
+
1
>=
4
)
{
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
)
{
}
else
if
(
foundLadyItem
)
{
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
Alert
.
alert
(
'
Oops!
'
,
"
This is a lady's item. Try again!
"
,
[
...
@@ -227,10 +235,10 @@ const styles = StyleSheet.create({
...
@@ -227,10 +235,10 @@ const styles = StyleSheet.create({
justifyContent
:
'
center
'
,
justifyContent
:
'
center
'
,
},
},
gameBoard
:
{
gameBoard
:
{
width
:
3
7
0
,
width
:
3
6
0
,
height
:
4
2
0
,
height
:
4
0
0
,
borderWidth
:
2
,
borderWidth
:
2
,
marginBottom
:
10
,
marginBottom
:
5
,
backgroundColor
:
'
#003333
'
,
backgroundColor
:
'
#003333
'
,
borderColor
:
'
white
'
,
borderColor
:
'
white
'
,
},
},
...
@@ -256,7 +264,7 @@ const styles = StyleSheet.create({
...
@@ -256,7 +264,7 @@ const styles = StyleSheet.create({
button
:
{
button
:
{
padding
:
10
,
padding
:
10
,
backgroundColor
:
'
#056676
'
,
backgroundColor
:
'
#056676
'
,
// marginBottom: 1
5,
borderRadius
:
5
,
},
},
playerImage
:
{
playerImage
:
{
width
:
'
100%
'
,
// Adjust as needed
width
:
'
100%
'
,
// Adjust as needed
...
@@ -286,10 +294,10 @@ const styles = StyleSheet.create({
...
@@ -286,10 +294,10 @@ const styles = StyleSheet.create({
top
:
1
,
top
:
1
,
},
},
buttonLeft
:
{
buttonLeft
:
{
left
:
20
0
,
left
:
13
0
,
},
},
buttonRight
:
{
buttonRight
:
{
right
:
7
0
,
right
:
13
0
,
},
},
buttonDown
:
{
buttonDown
:
{
bottom
:
1
,
bottom
:
1
,
...
...
src/services/auth/index.js
View file @
4d356d8d
import
axios
from
"
axios
"
;
import
axios
from
'
axios
'
;
const
BASE_PATH
=
'
http://1
0.0.2.2:8070
/api/mother
'
;
const
BASE_PATH
=
'
http://1
6.16.97.48
/api/mother
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
//signIn API Call
//signIn API Call
export
let
signin
=
async
(
email
,
password
)
=>
{
export
let
signin
=
async
(
email
,
password
)
=>
{
try
{
try
{
let
value
=
await
axios
.
post
(
BASE_PATH
+
'
/login
'
,
{
let
value
=
await
axios
.
post
(
BASE_PATH
+
'
/login
'
,
{
email
:
email
,
email
:
email
,
password
:
password
,
password
:
password
,
})
});
console
.
log
(
"
data1
"
,
value
.
data
)
console
.
log
(
'
data1
'
,
value
.
data
);
if
(
value
.
data
.
success
===
true
)
{
if
(
value
.
data
.
success
===
true
)
{
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
value
.
data
.
data
));
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
value
.
data
.
data
));
console
.
log
(
"
data
"
)
console
.
log
(
'
data
'
);
}
return
value
;
}
catch
(
error
)
{
return
error
}
}
}
return
value
;
}
catch
(
error
)
{
return
error
;
}
};
//signIn API Call
//signIn API Call
export
let
signup
=
async
(
name
,
password
,
email
,
age
,
week
)
=>
{
export
let
signup
=
async
(
name
,
password
,
email
,
age
,
week
)
=>
{
try
{
try
{
let
value
=
await
axios
.
post
(
BASE_PATH
+
'
/add_mother
'
,
{
let
value
=
await
axios
.
post
(
BASE_PATH
+
'
/add_mother
'
,
{
name
:
name
,
name
:
name
,
password
:
password
,
password
:
password
,
email
:
email
,
email
:
email
,
age
:
age
,
age
:
age
,
week
:
week
,
week
:
week
,
})
});
console
.
log
(
"
data1
"
,
value
.
data
)
console
.
log
(
'
data1
'
,
value
.
data
);
if
(
value
.
data
.
success
===
true
)
{
if
(
value
.
data
.
success
===
true
)
{
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
value
.
data
.
data
));
await
AsyncStorage
.
setItem
(
'
userData
'
,
JSON
.
stringify
(
value
.
data
.
data
));
console
.
log
(
"
data
"
)
console
.
log
(
'
data
'
);
}
return
value
;
}
catch
(
error
)
{
return
error
}
}
}
return
value
;
\ No newline at end of file
}
catch
(
error
)
{
return
error
;
}
};
src/services/games/index.js
View file @
4d356d8d
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
// const BASE_PATH = 'http://10.0.2.2:8000';
// 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
'
;
import
AsyncStorage
from
'
@react-native-async-storage/async-storage
'
;
//initialize payment API Call
//initialize payment API Call
...
...
yarn.lock
View file @
4d356d8d
...
@@ -7497,7 +7497,7 @@ typed-array-length@^1.0.6:
...
@@ -7497,7 +7497,7 @@ typed-array-length@^1.0.6:
is-typed-array "^1.1.13"
is-typed-array "^1.1.13"
possible-typed-array-names "^1.0.0"
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"
version "5.0.4"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz"
integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==
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