diff --git a/package-lock.json b/package-lock.json index 078f13d..14006b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "name": "stude_frontend", "version": "1.0.0", "dependencies": { - "@gorhom/bottom-sheet": "^4.4.7", "@react-native-async-storage/async-storage": "1.17.11", "@react-navigation/drawer": "^6.6.3", "@react-navigation/native": "^6.1.7", @@ -3112,43 +3111,6 @@ "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" }, - "node_modules/@gorhom/bottom-sheet": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/@gorhom/bottom-sheet/-/bottom-sheet-4.4.7.tgz", - "integrity": "sha512-ukTuTqDQi2heo68hAJsBpUQeEkdqP9REBcn47OpuvPKhdPuO1RBOOADjqXJNCnZZRcY+HqbnGPMSLFVc31zylQ==", - "dependencies": { - "@gorhom/portal": "1.0.14", - "invariant": "^2.2.4" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-native": "*", - "react": "*", - "react-native": "*", - "react-native-gesture-handler": ">=1.10.1", - "react-native-reanimated": ">=2.2.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-native": { - "optional": true - } - } - }, - "node_modules/@gorhom/portal": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@gorhom/portal/-/portal-1.0.14.tgz", - "integrity": "sha512-MXyL4xvCjmgaORr/rtryDNFy3kU4qUbKlwtQqqsygd0xX3mhKjOLn6mQK8wfu0RkoE0pBE0nAasRoHua+/QZ7A==", - "dependencies": { - "nanoid": "^3.3.1" - }, - "peerDependencies": { - "react": "*", - "react-native": "*" - } - }, "node_modules/@graphql-typed-document-node/core": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", diff --git a/package.json b/package.json index 37610e6..5af9ec0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "web": "expo start --web" }, "dependencies": { - "@gorhom/bottom-sheet": "^4.4.7", "@react-native-async-storage/async-storage": "1.17.11", "@react-navigation/drawer": "^6.6.3", "@react-navigation/native": "^6.1.7", diff --git a/src/components/Api/Api.tsx b/src/components/Api/Api.tsx index e7df9e3..b8a8ace 100644 --- a/src/components/Api/Api.tsx +++ b/src/components/Api/Api.tsx @@ -262,7 +262,7 @@ export async function PostStudentStatus(info: StudentStatusParams) { const config = await GetConfig(); console.log(info); return instance - .post("/api/v1/student_status/self/", info, config) + .patch("/api/v1/student_status/self/", info, config) .then((response) => { console.log("heh1"); return [true, response.data]; diff --git a/src/interfaces/Interfaces.tsx b/src/interfaces/Interfaces.tsx index 2eeb8d0..d613b7c 100644 --- a/src/interfaces/Interfaces.tsx +++ b/src/interfaces/Interfaces.tsx @@ -145,6 +145,7 @@ interface Location { } export interface StudentStatusParams { - subject: string; - location: Location; + subject?: string; + location?: Location; + active?: boolean; } diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 89b88c8..8672b7a 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -56,7 +56,7 @@ export default function Home() { return () => clearInterval(interval); }); - // Run when screen loads + // Refresh when screen loads useEffect(() => { requestLocation(); }, []); @@ -65,8 +65,8 @@ export default function Home() { let dist = GetDistance( location.coords.latitude, location.coords.longitude, - 8.4857, // LatitudeDelta - 124.6565 // LongitudeDelta + ustpCoords.latitude, + ustpCoords.longitude ); setDist(Math.round(dist)); }