From 4748ff2695655b152f6e75e282e8866f04306e1a Mon Sep 17 00:00:00 2001 From: thoreyjona Date: Mon, 23 Sep 2024 13:04:25 +0000 Subject: [PATCH 1/3] fix: use correct locale in applications query --- apps/native/app/src/screens/applications/applications.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/native/app/src/screens/applications/applications.tsx b/apps/native/app/src/screens/applications/applications.tsx index 33b459f40811..42e157caf749 100644 --- a/apps/native/app/src/screens/applications/applications.tsx +++ b/apps/native/app/src/screens/applications/applications.tsx @@ -104,8 +104,10 @@ export const ApplicationsScreen: NavigationFunctionComponent = ({ const [hiddenContent, setHiddenContent] = useState(isIos) const { locale } = usePreferencesStore() + const queryLocale = locale === 'is-IS' ? 'is' : 'en' + const applicationsRes = useListApplicationsQuery({ - variables: { locale: locale === 'is-US' ? 'is' : 'en' }, + variables: { locale: queryLocale }, }) const applications = useMemo( From 15b7a17325ee7f00f0e722e0b568991554d8b5a5 Mon Sep 17 00:00:00 2001 From: thoreyjona Date: Mon, 23 Sep 2024 14:22:25 +0000 Subject: [PATCH 2/3] fix: add margin for empty state in applications module --- .../src/screens/home/applications-module.tsx | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/apps/native/app/src/screens/home/applications-module.tsx b/apps/native/app/src/screens/home/applications-module.tsx index 076b53ec768e..0b0210b7cdae 100644 --- a/apps/native/app/src/screens/home/applications-module.tsx +++ b/apps/native/app/src/screens/home/applications-module.tsx @@ -1,7 +1,8 @@ import { EmptyCard, StatusCardSkeleton } from '@ui' import React from 'react' import { useIntl } from 'react-intl' -import { Image, SafeAreaView } from 'react-native' +import styled from 'styled-components' +import { Image, SafeAreaView, View } from 'react-native' import { ApolloError } from '@apollo/client' import leJobss3 from '../../assets/illustrations/le-jobs-s3.png' @@ -20,6 +21,10 @@ interface ApplicationsModuleProps { componentId: string } +const Wrapper = styled(View)` + margin-horizontal: ${({ theme }) => theme.spacing[2]}px; +` + const validateApplicationsInitialData = ({ data, loading, @@ -50,23 +55,27 @@ const ApplicationsModule = React.memo( return ( {loading && !data ? ( - + + + ) : ( <> {count === 0 && ( - - } - link={null} - /> + + + } + link={null} + /> + )} {count !== 0 && ( Date: Mon, 23 Sep 2024 14:34:09 +0000 Subject: [PATCH 3/3] fix: show progress bar for applications with 0 of x steps finished --- .../applications/components/applications-preview.tsx | 2 +- apps/native/app/src/ui/lib/card/status-card.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/native/app/src/screens/applications/components/applications-preview.tsx b/apps/native/app/src/screens/applications/components/applications-preview.tsx index cec7b6fd35c5..38d3948e7ca3 100644 --- a/apps/native/app/src/screens/applications/components/applications-preview.tsx +++ b/apps/native/app/src/screens/applications/components/applications-preview.tsx @@ -83,7 +83,7 @@ export const ApplicationsPreview = ({ }, )} progressContainerWidth={ - slider ? screenWidth - theme.spacing[2] * 6 : undefined + slider && count > 1 ? screenWidth - theme.spacing[2] * 6 : undefined } description={ type !== 'incomplete' diff --git a/apps/native/app/src/ui/lib/card/status-card.tsx b/apps/native/app/src/ui/lib/card/status-card.tsx index 2e7f89d32f60..9ddf4001376c 100644 --- a/apps/native/app/src/ui/lib/card/status-card.tsx +++ b/apps/native/app/src/ui/lib/card/status-card.tsx @@ -99,6 +99,8 @@ export function StatusCard({ const icon = getOrganizationLogoUrl(institution ?? '') const theme = useTheme() + const hideProgress = !progress && !progressTotalSteps + return ( @@ -128,9 +130,9 @@ export function StatusCard({ {!!description && {description}} - {!!progress && ( + {!hideProgress && (