From 9522a1c26f58b022a95642ddae849cc7d2041052 Mon Sep 17 00:00:00 2001 From: Guilherme Barbosa Ferreira Date: Sun, 2 Jul 2023 18:17:56 -0300 Subject: [PATCH 1/7] fix: fix wrong navigation while create --- app/src/pages/AuthPages/Location/index.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/pages/AuthPages/Location/index.jsx b/app/src/pages/AuthPages/Location/index.jsx index ad3cce9b..545ff978 100644 --- a/app/src/pages/AuthPages/Location/index.jsx +++ b/app/src/pages/AuthPages/Location/index.jsx @@ -8,7 +8,7 @@ import Button from '../../../components/UI/button'; import showWarningFor from '../../../utils/warningPopUp'; import { userPositionWarningMessage } from '../../../docs/warning'; import texts from './texts.json'; -import { useNavigation } from '@react-navigation/native'; +import { useNavigation, useNavigationState } from '@react-navigation/native'; import campaignService from '../../../services/Campaign'; import helpService from '../../../services/Help'; import callService from '../../../services/callService'; @@ -18,11 +18,14 @@ import { alertSuccess } from '../../../utils/Alert'; import { Dialog } from '../../../components/molecules/Dialog'; export default function Location({ route }) { const { requestInfo, requestType } = route.params; - const { userPosition, user } = useContext(UserContext); const { isLoading, setIsLoading } = useContext(LoadingContext); const { increaseUserBadge } = useContext(BadgeContext); + const state = useNavigationState((state) => state); + const { routes } = state; + const initialRoute = routes[0].name; + const [markLocation, setMarkerLocation] = useState({ type: 'Point', coordinates: [], @@ -71,7 +74,8 @@ export default function Location({ route }) { navigation, ); alertSuccess(texts[requestType].successText); - if (!badgeResponse?.recentUpdated) navigation.navigate('home'); + if (!badgeResponse?.recentUpdated) + navigation.navigate(initialRoute); } setIsLoading(false); } From 6aa7fba3d70dd93d9edbc98713eba2ad2d8e9aa3 Mon Sep 17 00:00:00 2001 From: Guilherme Barbosa Ferreira Date: Sun, 2 Jul 2023 18:18:13 -0300 Subject: [PATCH 2/7] fix: fix broken style --- app/src/Navigation/MainNavigation/screenOptions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/Navigation/MainNavigation/screenOptions.js b/app/src/Navigation/MainNavigation/screenOptions.js index 73e2e153..4768f3e7 100644 --- a/app/src/Navigation/MainNavigation/screenOptions.js +++ b/app/src/Navigation/MainNavigation/screenOptions.js @@ -13,7 +13,7 @@ export const screenOptions = ({ route }) => { ...fonts.body, color: colors.dark, fontSize: RFValue(14, 640), - width: Dimensions.get('screen').width * 0.3, + width: Dimensions.get('screen').width * 0.25, textAlign: 'center', }; const style = focused From 8b501967c55b8abd996d8819d79b1da4b5a3a800 Mon Sep 17 00:00:00 2001 From: Guilherme Barbosa Ferreira Date: Sun, 2 Jul 2023 18:18:34 -0300 Subject: [PATCH 3/7] fix: fix many requests when switch the tab --- .../pages/ActivitiesPages/History/index.jsx | 59 ++++++------- .../ActivitiesPages/MyOfferedHelp/index.jsx | 88 +++++++++---------- .../ActivitiesPages/MyRequestedHelp/index.jsx | 76 ++++++++-------- 3 files changed, 110 insertions(+), 113 deletions(-) diff --git a/app/src/pages/ActivitiesPages/History/index.jsx b/app/src/pages/ActivitiesPages/History/index.jsx index 4a2a1455..6dd8b38c 100644 --- a/app/src/pages/ActivitiesPages/History/index.jsx +++ b/app/src/pages/ActivitiesPages/History/index.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useState } from 'react'; -import { View, ScrollView } from 'react-native'; +import { View, FlatList } from 'react-native'; import { UserContext } from '../../../store/contexts/userContext'; import styles from '../styles'; import callService from '../../../services/callService'; @@ -10,20 +10,20 @@ import { TouchableOpacity } from 'react-native-gesture-handler'; import { LoadingContext } from '../../../store/contexts/loadingContext'; const OfferHelpPage = ({ navigation }) => { - const { user } = useContext(UserContext); + const { user, userPosition } = useContext(UserContext); const { isLoading, setIsLoading } = useContext(LoadingContext); + const [isRefreshing, setIsRefreshing] = useState(false); const [myOfferedHelp, setMyOfferedHelps] = useState([]); useEffect(() => { - const unsubscribe = navigation.addListener('focus', () => { - getHelps(); - }); - return unsubscribe; - }, [navigation]); + if (user._id && userPosition) { + getHelps(setIsLoading); + } + }, [user._id, userPosition]); - async function getHelps() { - setIsLoading(true); + async function getHelps(loadingSetter) { + loadingSetter(true); const filteredHelps = await callService( helpService, 'getHelpMultipleStatus', @@ -32,32 +32,31 @@ const OfferHelpPage = ({ navigation }) => { if (!filteredHelps.error) { setMyOfferedHelps(filteredHelps); } - setIsLoading(false); + loadingSetter(false); } const renderHelpRequestsList = () => { if (myOfferedHelp.length > 0) { return ( - - {myOfferedHelp.map((help) => { - return ( - - navigation.navigate( - 'myOfferHelpDescription', - { - helpId: help._id, - routeId: 'Help', - }, - ) - } - > - - - ); - })} - + ( + + navigation.navigate('myOfferHelpDescription', { + helpId: item._id, + routeId: 'Help', + }) + } + > + + + )} + keyExtractor={(help) => help._id} + refreshing={isRefreshing} + onRefresh={async () => getHelps(setIsRefreshing)} + /> ); } else { return ( diff --git a/app/src/pages/ActivitiesPages/MyOfferedHelp/index.jsx b/app/src/pages/ActivitiesPages/MyOfferedHelp/index.jsx index 7cfce88b..0fca5f70 100644 --- a/app/src/pages/ActivitiesPages/MyOfferedHelp/index.jsx +++ b/app/src/pages/ActivitiesPages/MyOfferedHelp/index.jsx @@ -1,11 +1,10 @@ -import React, { useState, useContext, useCallback } from 'react'; -import { View, ScrollView, TouchableOpacity } from 'react-native'; +import React, { useState, useContext, useEffect } from 'react'; +import { View, TouchableOpacity, FlatList } from 'react-native'; import MyRequestHelpCard from '../../../components/MyRequestCard'; import { UserContext } from '../../../store/contexts/userContext'; import helpService from '../../../services/Help'; import styles from '../styles'; import NoHelps from '../../../components/NoHelps'; -import { useFocusEffect } from '@react-navigation/native'; import callService from '../../../services/callService'; import PlusIconTextButton from '../../../components/PlusIconTextButton'; import createInteraction from '../../../utils/createInteraction'; @@ -20,15 +19,15 @@ export default function HelpsFinished({ navigation }) { const [confirmationModalVisible, setConfirmationModalVisible] = useState(false); const [helpToDelete, setHelpToDelete] = useState(null); + const [isRefreshing, setIsRefreshing] = useState(false); + const [shouldUpdate, setShouldUpdate] = useState(true); - useFocusEffect( - useCallback(() => { - loadOnGoingOffers(); - }, [navigation]), - ); + useEffect(() => { + if (shouldUpdate) loadOnGoingOffers(setIsLoading); + }, []); - async function loadOnGoingOffers() { - setIsLoading(true); + async function loadOnGoingOffers(loadingSetter) { + loadingSetter(true); const { _id: userId } = user; const resFinished = await callService(helpService, 'listHelpOffer', [ userId, @@ -37,11 +36,11 @@ export default function HelpsFinished({ navigation }) { if (!resFinished.error) { setFinishedHelpList(resFinished); } - setIsLoading(false); + loadingSetter(false); + setShouldUpdate(false); } async function excludeHelp() { - setIsLoading(true); const validDeleteRequest = await callService( helpService, 'deleteHelp', @@ -53,45 +52,44 @@ export default function HelpsFinished({ navigation }) { }); setFinishedHelpList(updatedArray); } - setIsLoading(false); setConfirmationModalVisible(false); + setShouldUpdate(true); } + const renderCards = ({ item }) => ( + + navigation.navigate('myOfferHelpDescription', { + helpId: item._id, + routeId: 'HelpOffer', + }) + } + > + + + ); + const renderHelpList = () => { if (finishedHelpList.length > 0) { return ( - - - {finishedHelpList.map((help) => { - return ( - - navigation.navigate( - 'myOfferHelpDescription', - { - helpId: help._id, - routeId: 'HelpOffer', - }, - ) - } - > - - - ); - })} - - + + item._id} + refreshing={isRefreshing} + onRefresh={() => loadOnGoingOffers(setIsRefreshing)} + /> + ); } else { return ; diff --git a/app/src/pages/ActivitiesPages/MyRequestedHelp/index.jsx b/app/src/pages/ActivitiesPages/MyRequestedHelp/index.jsx index 2fb4e6e1..8906c7dc 100644 --- a/app/src/pages/ActivitiesPages/MyRequestedHelp/index.jsx +++ b/app/src/pages/ActivitiesPages/MyRequestedHelp/index.jsx @@ -1,9 +1,8 @@ -import React, { useState, useContext, useCallback } from 'react'; -import { View, ScrollView, TouchableOpacity } from 'react-native'; +import React, { useState, useContext, useEffect } from 'react'; +import { View, TouchableOpacity, FlatList } from 'react-native'; import MyRequestCard from '../../../components/MyRequestCard'; import { UserContext } from '../../../store/contexts/userContext'; import helpService from '../../../services/Help'; -import { useFocusEffect } from '@react-navigation/native'; import NoHelps from '../../../components/NoHelps'; import callService from '../../../services/callService'; import styles from '../styles'; @@ -20,12 +19,12 @@ const MyRequestedHelp = ({ navigation }) => { const [confirmationModalVisible, setConfirmationModalVisible] = useState(false); const [helpToDelete, setHelpToDelete] = useState(null); + const [isRefreshing, setIsRefreshing] = useState(false); + const [shouldUpdate, setShouldUpdate] = useState(true); - useFocusEffect( - useCallback(() => { - loadOnGoingHelps(); - }, [navigation]), - ); + useEffect(() => { + if (shouldUpdate) loadOnGoingHelps(); + }, [navigation]); async function loadOnGoingHelps() { const { _id: userId } = user; @@ -39,6 +38,7 @@ const MyRequestedHelp = ({ navigation }) => { setMyRequestedHelps(filteredHelps); } setIsLoading(false); + setShouldUpdate(false); } async function excludeHelp() { @@ -56,41 +56,41 @@ const MyRequestedHelp = ({ navigation }) => { } setIsLoading(false); setConfirmationModalVisible(false); + setShouldUpdate(true); } + const renderCards = ({ item }) => ( + + navigation.navigate('myRequestHelpDescription', { + helpId: item._id, + routeId: 'Help', + }) + } + > + + + ); + const renderMyRequestsHelpList = () => { if (myRequestedHelps.length > 0) { return ( - - - {myRequestedHelps.map((help) => ( - - navigation.navigate( - 'myRequestHelpDescription', - { - helpId: help._id, - routeId: 'Help', - }, - ) - } - > - - - ))} - - + + item._id} + refreshing={isRefreshing} + onRefresh={() => loadOnGoingHelps(setIsRefreshing)} + /> + ); } else { return ; From b8817ddd8397ecb9f767709b9070d45eb9ea796b Mon Sep 17 00:00:00 2001 From: Guilherme Barbosa Ferreira Date: Fri, 7 Jul 2023 23:27:53 -0300 Subject: [PATCH 4/7] feat: create and use my activities flat list --- .../molecules/MyActivitiesFlatList/index.jsx | 61 ++++++++++++++++++ .../pages/ActivitiesPages/History/index.jsx | 30 ++++----- .../ActivitiesPages/MyOfferedHelp/index.jsx | 40 +++--------- .../ActivitiesPages/MyRequestedHelp/index.jsx | 62 +++++++------------ 4 files changed, 110 insertions(+), 83 deletions(-) create mode 100644 app/src/components/molecules/MyActivitiesFlatList/index.jsx diff --git a/app/src/components/molecules/MyActivitiesFlatList/index.jsx b/app/src/components/molecules/MyActivitiesFlatList/index.jsx new file mode 100644 index 00000000..55bce723 --- /dev/null +++ b/app/src/components/molecules/MyActivitiesFlatList/index.jsx @@ -0,0 +1,61 @@ +import React, { useState } from 'react'; +import { FlatList, TouchableOpacity } from 'react-native'; +import MyRequestCard from '../../MyRequestCard'; + +export function MyActivitiesFlatList({ + data, + loadOnGoingActivity, + navigation, + setConfirmationModalVisible, + setHelpToDelete, + renderItem, + type, +}) { + const [isRefreshing, setIsRefreshing] = useState(false); + + const navigateProps = { + offer: { + screen: 'myOfferHelpDescription', + routeId: 'HelpOffer', + }, + help: { + screen: 'myRequestHelpDescription', + routeId: 'Help', + }, + }; + + const renderCards = ({ item }) => { + const possibleInterestedList = + type == 'help' + ? item.possibleHelpers + : [...item.possibleHelpedUsers, ...item.helpedUserId]; + return ( + + navigation.navigate(navigateProps[type].screen, { + helpId: item._id, + routeId: navigateProps[type].routeId, + }) + } + > + + + ); + }; + + return ( + item._id} + refreshing={isRefreshing} + onRefresh={async () => loadOnGoingActivity(setIsRefreshing)} + /> + ); +} diff --git a/app/src/pages/ActivitiesPages/History/index.jsx b/app/src/pages/ActivitiesPages/History/index.jsx index 6dd8b38c..244726f7 100644 --- a/app/src/pages/ActivitiesPages/History/index.jsx +++ b/app/src/pages/ActivitiesPages/History/index.jsx @@ -1,5 +1,5 @@ -import React, { useContext, useEffect, useState } from 'react'; -import { View, FlatList } from 'react-native'; +import React, { useCallback, useContext, useState } from 'react'; +import { View } from 'react-native'; import { UserContext } from '../../../store/contexts/userContext'; import styles from '../styles'; import callService from '../../../services/callService'; @@ -8,19 +8,22 @@ import NoHelps from '../../../components/NoHelps'; import HistoricCard from '../../../components/HistoricCard'; import { TouchableOpacity } from 'react-native-gesture-handler'; import { LoadingContext } from '../../../store/contexts/loadingContext'; +import { MyActivitiesFlatList } from '../../../components/molecules/MyActivitiesFlatList'; +import { useFocusEffect } from '@react-navigation/native'; -const OfferHelpPage = ({ navigation }) => { - const { user, userPosition } = useContext(UserContext); +const OfferHelpPage = ({ navigation, route }) => { + const { user } = useContext(UserContext); const { isLoading, setIsLoading } = useContext(LoadingContext); - const [isRefreshing, setIsRefreshing] = useState(false); const [myOfferedHelp, setMyOfferedHelps] = useState([]); - useEffect(() => { - if (user._id && userPosition) { - getHelps(setIsLoading); - } - }, [user._id, userPosition]); + useFocusEffect( + useCallback(() => { + if (route.params.shouldUpdate) { + getHelps(setIsLoading); + } + }, [route.params.shouldUpdate]), + ); async function getHelps(loadingSetter) { loadingSetter(true); @@ -33,12 +36,13 @@ const OfferHelpPage = ({ navigation }) => { setMyOfferedHelps(filteredHelps); } loadingSetter(false); + navigation.setParams({ shouldUpdate: false }); } const renderHelpRequestsList = () => { if (myOfferedHelp.length > 0) { return ( - ( { )} - keyExtractor={(help) => help._id} - refreshing={isRefreshing} - onRefresh={async () => getHelps(setIsRefreshing)} + loadOnGoingActivity={getHelps} /> ); } else { diff --git a/app/src/pages/ActivitiesPages/MyOfferedHelp/index.jsx b/app/src/pages/ActivitiesPages/MyOfferedHelp/index.jsx index ba15e270..2fb72ffc 100644 --- a/app/src/pages/ActivitiesPages/MyOfferedHelp/index.jsx +++ b/app/src/pages/ActivitiesPages/MyOfferedHelp/index.jsx @@ -1,6 +1,5 @@ import React, { useState, useContext, useEffect } from 'react'; -import { View, TouchableOpacity, FlatList } from 'react-native'; -import MyRequestHelpCard from '../../../components/MyRequestCard'; +import { View } from 'react-native'; import { UserContext } from '../../../store/contexts/userContext'; import helpService from '../../../services/Help'; import styles from '../styles'; @@ -10,6 +9,7 @@ import PlusIconTextButton from '../../../components/PlusIconTextButton'; import createInteraction from '../../../utils/createInteraction'; import { LoadingContext } from '../../../store/contexts/loadingContext'; import { Dialog } from '../../../components/molecules/Dialog'; +import { MyActivitiesFlatList } from '../../../components/molecules/MyActivitiesFlatList'; export default function HelpsFinished({ navigation }) { const { user, userPosition } = useContext(UserContext); @@ -19,7 +19,6 @@ export default function HelpsFinished({ navigation }) { const [confirmationModalVisible, setConfirmationModalVisible] = useState(false); const [helpToDelete, setHelpToDelete] = useState(null); - const [isRefreshing, setIsRefreshing] = useState(false); const [shouldUpdate, setShouldUpdate] = useState(true); useEffect(() => { @@ -57,38 +56,19 @@ export default function HelpsFinished({ navigation }) { setShouldUpdate(true); } - const renderCards = ({ item }) => ( - - navigation.navigate('myOfferHelpDescription', { - helpId: item._id, - routeId: 'HelpOffer', - }) - } - > - - - ); - const renderHelpList = () => { if (finishedHelpList.length > 0) { return ( - item._id} - refreshing={isRefreshing} - onRefresh={() => loadOnGoingOffers(setIsRefreshing)} + loadOnGoingActivity={loadOnGoingOffers} + navigation={navigation} + setConfirmationModalVisible={ + setConfirmationModalVisible + } + setHelpToDelete={setHelpToDelete} + type="offer" /> ); diff --git a/app/src/pages/ActivitiesPages/MyRequestedHelp/index.jsx b/app/src/pages/ActivitiesPages/MyRequestedHelp/index.jsx index 8906c7dc..eea202d9 100644 --- a/app/src/pages/ActivitiesPages/MyRequestedHelp/index.jsx +++ b/app/src/pages/ActivitiesPages/MyRequestedHelp/index.jsx @@ -1,6 +1,5 @@ -import React, { useState, useContext, useEffect } from 'react'; -import { View, TouchableOpacity, FlatList } from 'react-native'; -import MyRequestCard from '../../../components/MyRequestCard'; +import React, { useState, useContext, useCallback } from 'react'; +import { View } from 'react-native'; import { UserContext } from '../../../store/contexts/userContext'; import helpService from '../../../services/Help'; import NoHelps from '../../../components/NoHelps'; @@ -10,8 +9,10 @@ import PlusIconTextButton from '../../../components/PlusIconTextButton'; import createInteraction from '../../../utils/createInteraction'; import { LoadingContext } from '../../../store/contexts/loadingContext'; import { Dialog } from '../../../components/molecules/Dialog'; +import { MyActivitiesFlatList } from '../../../components/molecules/MyActivitiesFlatList'; +import { useFocusEffect } from '@react-navigation/native'; -const MyRequestedHelp = ({ navigation }) => { +const MyRequestedHelp = ({ navigation, route }) => { const { user } = useContext(UserContext); const { isLoading, setIsLoading } = useContext(LoadingContext); @@ -19,16 +20,16 @@ const MyRequestedHelp = ({ navigation }) => { const [confirmationModalVisible, setConfirmationModalVisible] = useState(false); const [helpToDelete, setHelpToDelete] = useState(null); - const [isRefreshing, setIsRefreshing] = useState(false); - const [shouldUpdate, setShouldUpdate] = useState(true); - useEffect(() => { - if (shouldUpdate) loadOnGoingHelps(); - }, [navigation]); + useFocusEffect( + useCallback(() => { + if (route.params.shouldUpdate) loadOnGoingHelps(setIsLoading); + }, [route.params.shouldUpdate]), + ); - async function loadOnGoingHelps() { + async function loadOnGoingHelps(loadingSetter) { const { _id: userId } = user; - setIsLoading(true); + loadingSetter(true); const filteredHelps = await callService( helpService, 'getHelpMultipleStatus', @@ -37,8 +38,8 @@ const MyRequestedHelp = ({ navigation }) => { if (!filteredHelps.error) { setMyRequestedHelps(filteredHelps); } - setIsLoading(false); - setShouldUpdate(false); + loadingSetter(false); + navigation.setParams({ shouldUpdate: false }); } async function excludeHelp() { @@ -56,39 +57,22 @@ const MyRequestedHelp = ({ navigation }) => { } setIsLoading(false); setConfirmationModalVisible(false); - setShouldUpdate(true); + navigation.setParams({ shouldUpdate: true }); } - const renderCards = ({ item }) => ( - - navigation.navigate('myRequestHelpDescription', { - helpId: item._id, - routeId: 'Help', - }) - } - > - - - ); - const renderMyRequestsHelpList = () => { if (myRequestedHelps.length > 0) { return ( - item._id} - refreshing={isRefreshing} - onRefresh={() => loadOnGoingHelps(setIsRefreshing)} + loadOnGoingActivity={loadOnGoingHelps} + navigation={navigation} + setConfirmationModalVisible={ + setConfirmationModalVisible + } + setHelpToDelete={setHelpToDelete} + type="help" /> ); From e25987653d8d05567d01360c12b7af4797a62637 Mon Sep 17 00:00:00 2001 From: Guilherme Barbosa Ferreira Date: Fri, 7 Jul 2023 23:28:21 -0300 Subject: [PATCH 5/7] feat: reload the page by navigation params --- .../Navigation/MainNavigation/GivenHelps/index.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/Navigation/MainNavigation/GivenHelps/index.jsx b/app/src/Navigation/MainNavigation/GivenHelps/index.jsx index ee3350c8..f47e3e56 100644 --- a/app/src/Navigation/MainNavigation/GivenHelps/index.jsx +++ b/app/src/Navigation/MainNavigation/GivenHelps/index.jsx @@ -16,7 +16,11 @@ export const NavigationGivenHelps = () => { screenOptions={screenOptions} > {isEntity ? OngGivenHelps() : UserGivenHelps()} - + ); }; @@ -28,6 +32,10 @@ const OngGivenHelps = () => ( const UserGivenHelps = () => ( <> - + ); From fba956dc2c37b71c8c2841373c2c440c5417856e Mon Sep 17 00:00:00 2001 From: Guilherme Barbosa Ferreira Date: Fri, 7 Jul 2023 23:28:34 -0300 Subject: [PATCH 6/7] fix: fixing styles --- app/src/Navigation/MainNavigation/screenOptions.js | 4 +--- app/src/pages/ActivitiesPages/styles.js | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/Navigation/MainNavigation/screenOptions.js b/app/src/Navigation/MainNavigation/screenOptions.js index 4768f3e7..4d11ae31 100644 --- a/app/src/Navigation/MainNavigation/screenOptions.js +++ b/app/src/Navigation/MainNavigation/screenOptions.js @@ -29,12 +29,10 @@ export const screenOptions = ({ route }) => { shadowColor: 'transparent', borderBottomWidth: 1, borderColor: '#BCCBCA', - paddingHorizontal: 8, }, tabBarIndicatorStyle: { backgroundColor: colors.primary.DEFAULT, - borderRadius: 16, - padding: 1, + borderRadius: 100, }, }; }; diff --git a/app/src/pages/ActivitiesPages/styles.js b/app/src/pages/ActivitiesPages/styles.js index b3f12b1f..f7786ed1 100644 --- a/app/src/pages/ActivitiesPages/styles.js +++ b/app/src/pages/ActivitiesPages/styles.js @@ -11,8 +11,7 @@ const styles = StyleSheet.create({ }, helpList: { - marginLeft: 15, - marginRight: 15, + paddingHorizontal: 15, marginBottom: 15, }, From 6dcaae6b4d34898574830765240ff4305d7327b9 Mon Sep 17 00:00:00 2001 From: Guilherme Barbosa Ferreira Date: Sat, 8 Jul 2023 18:09:13 -0300 Subject: [PATCH 7/7] fix: fix unnecessary async --- app/src/components/molecules/MyActivitiesFlatList/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/components/molecules/MyActivitiesFlatList/index.jsx b/app/src/components/molecules/MyActivitiesFlatList/index.jsx index 55bce723..e5bd9625 100644 --- a/app/src/components/molecules/MyActivitiesFlatList/index.jsx +++ b/app/src/components/molecules/MyActivitiesFlatList/index.jsx @@ -55,7 +55,7 @@ export function MyActivitiesFlatList({ renderItem={renderItem || renderCards} key={(item) => item._id} refreshing={isRefreshing} - onRefresh={async () => loadOnGoingActivity(setIsRefreshing)} + onRefresh={() => loadOnGoingActivity(setIsRefreshing)} /> ); }