mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2024-11-17 06:19:25 +08:00
Remove bottomsheet library and added homepage improvements
This commit is contained in:
parent
029ef84671
commit
126223394d
5 changed files with 7 additions and 45 deletions
38
package-lock.json
generated
38
package-lock.json
generated
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -145,6 +145,7 @@ interface Location {
|
|||
}
|
||||
|
||||
export interface StudentStatusParams {
|
||||
subject: string;
|
||||
location: Location;
|
||||
subject?: string;
|
||||
location?: Location;
|
||||
active?: boolean;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue