Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
21_22-J 38
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
21_22-J 38
21_22-J 38
Commits
3570f4b4
Commit
3570f4b4
authored
Apr 28, 2022
by
Neranga K.T.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e38c0128
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
147 deletions
+29
-147
frontend/package-lock.json
frontend/package-lock.json
+24
-144
frontend/src/constants/endpoint.js
frontend/src/constants/endpoint.js
+1
-0
frontend/src/router/router.js
frontend/src/router/router.js
+1
-1
frontend/src/screen/memory/GameOverScreen.js
frontend/src/screen/memory/GameOverScreen.js
+3
-2
No files found.
frontend/package-lock.json
View file @
3570f4b4
This diff is collapsed.
Click to expand it.
frontend/src/constants/endpoint.js
0 → 100644
View file @
3570f4b4
export
default
api
=
'
http://192.168.8.170:5000
'
\ No newline at end of file
frontend/src/router/router.js
View file @
3570f4b4
...
...
@@ -7,7 +7,7 @@ import Home from '../screen/home';
import
Start
from
'
../screen/Start
'
;
import
Register
from
'
../screen/auth/Register
'
;
import
Login
from
'
../screen/auth/Login
'
;
import
Splash
from
'
../screen/splash/
S
plash
'
;
import
Splash
from
'
../screen/splash/
s
plash
'
;
import
Color
from
'
../screen/Color
'
;
import
Blue
from
'
../screen/activity/Blue
'
;
import
Blue2
from
'
../screen/activity/Blue2
'
;
...
...
frontend/src/screen/memory/GameOverScreen.js
View file @
3570f4b4
...
...
@@ -3,6 +3,7 @@ import {View, Text, StyleSheet, Button, Image} from 'react-native';
import
Colors
from
'
../../constants/Colors
'
;
import
{
useDispatch
,
useSelector
}
from
'
react-redux
'
;
import
*
as
memoryActions
from
'
../../store/actions/memory
'
;
import
endpoint
from
'
../../constants/endpoint
'
;
const
GameOverScreen
=
({
navigation
})
=>
{
...
...
@@ -47,7 +48,7 @@ const GameOverScreen = ({navigation}) => {
}
const
sendData
=
()
=>
{
fetch
(
`
http://192.168.8.170:5000
/get_level?q1=
${
encodeURIComponent
(
gameData
.
q1
)}
&q2=
${
encodeURIComponent
(
gameData
.
q2
)}
&q3=
${
encodeURIComponent
(
gameData
.
q3
)}
&q4=
${
encodeURIComponent
(
gameData
.
q4
)}
&q5=
${
encodeURIComponent
(
gameData
.
q5
)}
&q6=
${
encodeURIComponent
(
gameData
.
q6
)}
&time=
${
encodeURIComponent
(
gameData
.
time
)}
`
,{
fetch
(
`
${
endpoint
}
/get_level?q1=
${
encodeURIComponent
(
gameData
.
q1
)}
&q2=
${
encodeURIComponent
(
gameData
.
q2
)}
&q3=
${
encodeURIComponent
(
gameData
.
q3
)}
&q4=
${
encodeURIComponent
(
gameData
.
q4
)}
&q5=
${
encodeURIComponent
(
gameData
.
q5
)}
&q6=
${
encodeURIComponent
(
gameData
.
q6
)}
&time=
${
encodeURIComponent
(
gameData
.
time
)}
`
,{
method
:
'
GET
'
})
.
then
(
resp
=>
resp
.
json
())
...
...
@@ -68,7 +69,7 @@ const GameOverScreen = ({navigation}) => {
}
const
insertData
=
()
=>
{
fetch
(
'
http://192.168.8.170:5000/add
'
,
{
fetch
(
`
${
endpoint
}
/add`
,
{
method
:
'
POST
'
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
...
...
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