From b9eba45c56fe16df56abab1651164f93ba8ea599 Mon Sep 17 00:00:00 2001 From: thoreyjona Date: Wed, 11 Sep 2024 15:56:27 +0000 Subject: [PATCH] feat: add pull to refresh on new applications page --- .../src/screens/applications/applications.tsx | 90 +++++++++---------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/apps/native/app/src/screens/applications/applications.tsx b/apps/native/app/src/screens/applications/applications.tsx index 76b94b95e6bb9..1e2a4294f85d0 100644 --- a/apps/native/app/src/screens/applications/applications.tsx +++ b/apps/native/app/src/screens/applications/applications.tsx @@ -1,8 +1,7 @@ import { EmptyList } from '@ui' import { useCallback, useMemo, useState } from 'react' import { useIntl } from 'react-intl' -import { Image, SafeAreaView, ScrollView, View } from 'react-native' -import { useTheme } from 'styled-components' +import { Image, RefreshControl, ScrollView, View } from 'react-native' import { NavigationFunctionComponent } from 'react-native-navigation' import { useNavigationComponentDidAppear } from 'react-native-navigation-hooks' import illustrationSrc from '../../assets/illustrations/le-jobs-s3.png' @@ -96,9 +95,8 @@ export const ApplicationsScreen: NavigationFunctionComponent = ({ componentId, }) => { useNavigationOptions(componentId) - const theme = useTheme() - const [refetching, setRefetching] = useState(false) const intl = useIntl() + const [refetching, setRefetching] = useState(false) const [hiddenContent, setHiddenContent] = useState(isIos) const applicationsRes = useListApplicationsQuery() @@ -141,50 +139,48 @@ export const ApplicationsScreen: NavigationFunctionComponent = ({ return ( <> - + } > - - {!applications.length ? ( - - - } - /> - - ) : null} - - - - - + {!applications.length ? ( + + + } + /> + + ) : null} + + + + )