mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-06-29 00:35:46 +08:00
Code cleanup
This commit is contained in:
parent
a9d7188c67
commit
b0345dc2b7
4 changed files with 11 additions and 20 deletions
|
@ -34,14 +34,6 @@ import { useToast } from "react-native-toast-notifications";
|
|||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer";
|
||||
|
||||
type ConversationType = {
|
||||
id: number;
|
||||
user: string;
|
||||
message_content: string;
|
||||
study_group: string;
|
||||
color: string;
|
||||
};
|
||||
|
||||
export default function ConversationPage() {
|
||||
const toast = useToast();
|
||||
// Student Status
|
||||
|
|
|
@ -38,7 +38,7 @@ import CaretUpIcon from "../../icons/CaretUpIcon/CaretUpIcon";
|
|||
|
||||
export default function Home() {
|
||||
// Switch this condition to see the main map when debugging
|
||||
const map_debug = true;
|
||||
const map_distance_override = true;
|
||||
const navigation = useNavigation<RootDrawerParamList>();
|
||||
const [location, setLocation] = useState<RawLocationType | null>(null);
|
||||
const [dist, setDist] = useState<number | null>(null);
|
||||
|
@ -100,7 +100,7 @@ export default function Home() {
|
|||
let dist = GetDistanceFromUSTP(location.coords);
|
||||
setDist(dist);
|
||||
// Deactivate student status if too far away
|
||||
if (dist >= 2 && !map_debug)
|
||||
if (dist >= 2 && !map_distance_override)
|
||||
stop_studying.mutate({
|
||||
active: false,
|
||||
});
|
||||
|
@ -345,7 +345,7 @@ export default function Home() {
|
|||
|
||||
function CustomMap() {
|
||||
if (dist && location) {
|
||||
if (dist <= 2 || map_debug) {
|
||||
if (dist <= 2 || map_distance_override) {
|
||||
return (
|
||||
<>
|
||||
<MapView
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue