Skip to content

Commit 9265a6a

Browse files
authored
Merge pull request #57779 from Expensify/cristi_remove-maintenance-popup
[No QA] Remove Spotnana's scheduled maintenance modal
2 parents 2d04b15 + 7b817d1 commit 9265a6a

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

src/components/BookTravelButton.tsx

-23
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import usePolicy from '@hooks/usePolicy';
77
import useThemeStyles from '@hooks/useThemeStyles';
88
import {openTravelDotLink} from '@libs/actions/Link';
99
import {cleanupTravelProvisioningSession} from '@libs/actions/Travel';
10-
import DateUtils from '@libs/DateUtils';
1110
import Log from '@libs/Log';
1211
import Navigation from '@libs/Navigation/Navigation';
1312
import {getAdminsPrivateEmailDomains, isPaidGroupPolicy} from '@libs/PolicyUtils';
@@ -16,7 +15,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
1615
import ROUTES from '@src/ROUTES';
1716
import {isEmptyObject} from '@src/types/utils/EmptyObject';
1817
import Button from './Button';
19-
import ConfirmModal from './ConfirmModal';
2018
import CustomStatusBarAndBackgroundContext from './CustomStatusBarAndBackground/CustomStatusBarAndBackgroundContext';
2119
import DotIndicatorMessage from './DotIndicatorMessage';
2220

@@ -30,10 +28,6 @@ const navigateToAcceptTerms = (domain: string) => {
3028
Navigation.navigate(ROUTES.TRAVEL_TCS.getRoute(domain));
3129
};
3230

33-
// Spotnana has scheduled maintenance from February 23 at 7 AM EST (12 PM UTC) to February 24 at 12 PM EST (5 PM UTC).
34-
const SPOTNANA_BLACKOUT_PERIOD_START = '2025-02-23T11:59:00Z';
35-
const SPOTNANA_BLACKOUT_PERIOD_END = '2025-02-24T17:01:00Z';
36-
3731
function BookTravelButton({text}: BookTravelButtonProps) {
3832
const styles = useThemeStyles();
3933
const {translate} = useLocalize();
@@ -44,22 +38,14 @@ function BookTravelButton({text}: BookTravelButtonProps) {
4438
const [account] = useOnyx(ONYXKEYS.ACCOUNT);
4539
const primaryLogin = account?.primaryLogin;
4640
const {setRootStatusBarEnabled} = useContext(CustomStatusBarAndBackgroundContext);
47-
const [isMaintenanceModalVisible, setMaintenanceModalVisibility] = useState(false);
4841

4942
// Flag indicating whether NewDot was launched exclusively for Travel,
5043
// e.g., when the user selects "Trips" from the Expensify Classic menu in HybridApp.
5144
const [wasNewDotLaunchedJustForTravel] = useOnyx(ONYXKEYS.IS_SINGLE_NEW_DOT_ENTRY);
5245

53-
const hideMaintenanceModal = () => setMaintenanceModalVisibility(false);
54-
5546
const bookATrip = useCallback(() => {
5647
setErrorMessage('');
5748

58-
if (DateUtils.isCurrentTimeWithinRange(SPOTNANA_BLACKOUT_PERIOD_START, SPOTNANA_BLACKOUT_PERIOD_END)) {
59-
setMaintenanceModalVisibility(true);
60-
return;
61-
}
62-
6349
// The primary login of the user is where Spotnana sends the emails with booking confirmations, itinerary etc. It can't be a phone number.
6450
if (!primaryLogin || Str.isSMSLogin(primaryLogin)) {
6551
setErrorMessage(translate('travel.phoneError'));
@@ -130,15 +116,6 @@ function BookTravelButton({text}: BookTravelButtonProps) {
130116
success
131117
large
132118
/>
133-
<ConfirmModal
134-
title={translate('travel.maintenance.title')}
135-
onConfirm={hideMaintenanceModal}
136-
onCancel={hideMaintenanceModal}
137-
isVisible={isMaintenanceModalVisible}
138-
prompt={translate('travel.maintenance.message')}
139-
confirmText={translate('common.buttonConfirm')}
140-
shouldShowCancelButton={false}
141-
/>
142119
</>
143120
);
144121
}

src/languages/en.ts

-4
Original file line numberDiff line numberDiff line change
@@ -2641,10 +2641,6 @@ const translations = {
26412641
title: 'Get started with Expensify Travel',
26422642
message: `You'll need to use your work email (e.g., [email protected]) with Expensify Travel, not your personal email (e.g., [email protected]).`,
26432643
},
2644-
maintenance: {
2645-
title: 'Expensify Travel is getting an upgrade! 🚀',
2646-
message: `It'll be unavailable February 23-24, but back and better than ever after that. If you need help with a current trip, please call +1 866-296-7768. Thanks!`,
2647-
},
26482644
},
26492645
workspace: {
26502646
common: {

src/languages/es.ts

-4
Original file line numberDiff line numberDiff line change
@@ -2665,10 +2665,6 @@ const translations = {
26652665
title: 'Comienza con Expensify Travel',
26662666
message: 'Tendrás que usar tu correo electrónico laboral (por ejemplo, [email protected]) con Expensify Travel, no tu correo personal (por ejemplo, [email protected]).',
26672667
},
2668-
maintenance: {
2669-
title: '¡Expensify Travel está recibiendo una actualización! 🚀',
2670-
message: `No estará disponible del 23 al 24 de febrero, pero volverá mejor que nunca después de eso. Si necesitas ayuda con un viaje actual, por favor llama al +1 866-296-7768. ¡Gracias!`,
2671-
},
26722668
},
26732669
workspace: {
26742670
common: {

0 commit comments

Comments
 (0)