Commit 3570f4b4 authored by Neranga K.T.'s avatar Neranga K.T.

.

parent e38c0128
This diff is collapsed.
export default api = 'http://192.168.8.170:5000'
\ No newline at end of file
......@@ -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/Splash';
import Splash from '../screen/splash/splash';
import Color from '../screen/Color';
import Blue from '../screen/activity/Blue';
import Blue2 from '../screen/activity/Blue2';
......
......@@ -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'
......
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