Remove bottomsheet library and added homepage improvements

This commit is contained in:
Keannu Christian Bernasol 2023-08-07 14:22:47 +08:00
parent 029ef84671
commit 126223394d
5 changed files with 7 additions and 45 deletions

View file

@ -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];

View file

@ -145,6 +145,7 @@ interface Location {
}
export interface StudentStatusParams {
subject: string;
location: Location;
subject?: string;
location?: Location;
active?: boolean;
}

View file

@ -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));
}