mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-05-17 03:48:06 +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
|
@ -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…
Add table
Add a link
Reference in a new issue