mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-06-29 00:35:46 +08:00
Fixed pullup menu wording on homepage and added message notifications
This commit is contained in:
parent
798c1a5e6b
commit
2461f2c404
3 changed files with 80 additions and 20 deletions
|
@ -33,6 +33,7 @@ import {
|
|||
import { useToast } from "react-native-toast-notifications";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer";
|
||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||
|
||||
export default function ConversationPage() {
|
||||
const toast = useToast();
|
||||
|
@ -104,8 +105,9 @@ export default function ConversationPage() {
|
|||
}
|
||||
return data;
|
||||
},
|
||||
onSuccess: (data: MessageReturnType) => {
|
||||
onSuccess: async (data: MessageReturnType) => {
|
||||
if (data[1]) {
|
||||
await AsyncStorage.setItem("messages", JSON.stringify(data[1]));
|
||||
setMessages(data[1]);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -845,7 +845,6 @@ export default function Home() {
|
|||
hasBackdrop={false}
|
||||
>
|
||||
<AnimatedContainer>
|
||||
<Text style={styles.text_white_medium}>Groups List</Text>
|
||||
<Pressable
|
||||
style={{
|
||||
alignContent: "flex-start",
|
||||
|
@ -856,12 +855,16 @@ export default function Home() {
|
|||
>
|
||||
<DropdownIcon size={32} />
|
||||
</Pressable>
|
||||
<Switch
|
||||
value={modalByGroup}
|
||||
onChange={() => {
|
||||
setModalByGroup(!modalByGroup);
|
||||
}}
|
||||
/>
|
||||
<View style={styles.flex_row}>
|
||||
<Switch
|
||||
value={modalByGroup}
|
||||
onChange={() => {
|
||||
setModalByGroup(!modalByGroup);
|
||||
}}
|
||||
/>
|
||||
<Text style={styles.text_white_medium}>List View</Text>
|
||||
</View>
|
||||
|
||||
<ScrollView>
|
||||
{!modalByGroup ? (
|
||||
student_statuses.map(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue