From 170c177ceab9aa249287cf3e60976cdcdf5c89aa Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Wed, 11 Dec 2024 01:01:56 +0300 Subject: [PATCH 1/2] fix concierge header extra spacing --- src/pages/home/HeaderView.tsx | 9 +++++++-- src/pages/settings/Subscription/FreeTrial.tsx | 10 ++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/pages/home/HeaderView.tsx b/src/pages/home/HeaderView.tsx index d55b3ad04db4..b4e19bce920a 100644 --- a/src/pages/home/HeaderView.tsx +++ b/src/pages/home/HeaderView.tsx @@ -126,7 +126,12 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto /> ); - const freeTrialButton = ; + const freeTrialButton = ( + + ); const renderAdditionalText = () => { if (shouldShowSubtitle() || isPersonalExpenseChat || !policyName || !isEmptyObject(parentNavigationSubtitleData) || isSelfDM) { @@ -310,7 +315,7 @@ function HeaderView({report, parentReportAction, reportID, onNavigationMenuButto )} {!isLoading && canJoin && shouldUseNarrowLayout && {joinButton}} - {!isLoading && isChatUsedForOnboarding && shouldUseNarrowLayout && {freeTrialButton}} + {!isLoading && isChatUsedForOnboarding && shouldUseNarrowLayout && freeTrialButton} ); } diff --git a/src/pages/settings/Subscription/FreeTrial.tsx b/src/pages/settings/Subscription/FreeTrial.tsx index 298cb823de97..499adfa3a89d 100644 --- a/src/pages/settings/Subscription/FreeTrial.tsx +++ b/src/pages/settings/Subscription/FreeTrial.tsx @@ -1,9 +1,11 @@ import React, {useEffect, useState} from 'react'; import type {StyleProp, ViewStyle} from 'react-native'; +import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import Badge from '@components/Badge'; import Button from '@components/Button'; import useNetwork from '@hooks/useNetwork'; +import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; import * as SubscriptionUtils from '@libs/SubscriptionUtils'; import * as Expensicons from '@src/components/Icon/Expensicons'; @@ -13,9 +15,11 @@ import ROUTES from '@src/ROUTES'; type FreeTrialProps = { badgeStyles?: StyleProp; pressable?: boolean; + addSpacing?: boolean; }; -function FreeTrial({badgeStyles, pressable = false}: FreeTrialProps) { +function FreeTrial({badgeStyles, pressable = false, addSpacing = false}: FreeTrialProps) { + const styles = useThemeStyles(); const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); const [firstDayFreeTrial] = useOnyx(ONYXKEYS.NVP_FIRST_DAY_FREE_TRIAL); const [lastDayFreeTrial] = useOnyx(ONYXKEYS.NVP_LAST_DAY_FREE_TRIAL); @@ -35,7 +39,7 @@ function FreeTrial({badgeStyles, pressable = false}: FreeTrialProps) { return null; } - return pressable ? ( + const freeTrial = pressable ? (