mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2024-11-17 06:19:25 +08:00
Move refresh button to the bottom alongside studying and group create buttons
This commit is contained in:
parent
a0d27aaa38
commit
e354335590
1 changed files with 31 additions and 17 deletions
|
@ -398,22 +398,6 @@ export default function Home() {
|
||||||
if (dist <= 1 || map_distance_override) {
|
if (dist <= 1 || map_distance_override) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<View style={{ alignSelf: "flex-end" }}>
|
|
||||||
<Pressable
|
|
||||||
onPress={() => {
|
|
||||||
queryClient.invalidateQueries({ queryKey: ["user"] });
|
|
||||||
queryClient.invalidateQueries({ queryKey: ["user_status"] });
|
|
||||||
queryClient.invalidateQueries({
|
|
||||||
queryKey: ["user_status_list"],
|
|
||||||
});
|
|
||||||
queryClient.invalidateQueries({
|
|
||||||
queryKey: ["study_group_list"],
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<RefreshIcon size={32} />
|
|
||||||
</Pressable>
|
|
||||||
</View>
|
|
||||||
<MapView
|
<MapView
|
||||||
mapType={"none"}
|
mapType={"none"}
|
||||||
style={styles.map}
|
style={styles.map}
|
||||||
|
@ -878,9 +862,39 @@ export default function Home() {
|
||||||
>
|
>
|
||||||
<Text style={styles.text_white_small}>{buttonLabel}</Text>
|
<Text style={styles.text_white_small}>{buttonLabel}</Text>
|
||||||
</Button>
|
</Button>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
backgroundColor: colors.secondary_3,
|
||||||
|
borderRadius: 16,
|
||||||
|
alignSelf: "center",
|
||||||
|
marginHorizontal: 8,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Pressable
|
||||||
|
onPress={() => {
|
||||||
|
queryClient.invalidateQueries({ queryKey: ["user"] });
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: ["user_status"],
|
||||||
|
});
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: ["user_status_list"],
|
||||||
|
});
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: ["study_group_list"],
|
||||||
|
});
|
||||||
|
toast.show("Refreshed", {
|
||||||
|
type: "success",
|
||||||
|
placement: "top",
|
||||||
|
duration: 2000,
|
||||||
|
animationType: "slide-in",
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<RefreshIcon size={32} />
|
||||||
|
</Pressable>
|
||||||
|
</View>
|
||||||
<Pressable
|
<Pressable
|
||||||
style={{
|
style={{
|
||||||
display: modalOpen ? "none" : "flex",
|
|
||||||
backgroundColor: colors.secondary_3,
|
backgroundColor: colors.secondary_3,
|
||||||
borderRadius: 16,
|
borderRadius: 16,
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
|
|
Loading…
Reference in a new issue