Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions src/components/BookTravelButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import usePolicy from '@hooks/usePolicy';
import useThemeStyles from '@hooks/useThemeStyles';
import {openTravelDotLink} from '@libs/actions/Link';
import {cleanupTravelProvisioningSession} from '@libs/actions/Travel';
import DateUtils from '@libs/DateUtils';
import Log from '@libs/Log';
import Navigation from '@libs/Navigation/Navigation';
import {getAdminsPrivateEmailDomains, isPaidGroupPolicy} from '@libs/PolicyUtils';
Expand All @@ -16,7 +15,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import Button from './Button';
import ConfirmModal from './ConfirmModal';
import CustomStatusBarAndBackgroundContext from './CustomStatusBarAndBackground/CustomStatusBarAndBackgroundContext';
import DotIndicatorMessage from './DotIndicatorMessage';

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

// Spotnana has scheduled maintenance from February 23 at 7 AM EST (12 PM UTC) to February 24 at 12 PM EST (5 PM UTC).
const SPOTNANA_BLACKOUT_PERIOD_START = '2025-02-23T11:59:00Z';
const SPOTNANA_BLACKOUT_PERIOD_END = '2025-02-24T17:01:00Z';

function BookTravelButton({text}: BookTravelButtonProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
Expand All @@ -44,22 +38,14 @@ function BookTravelButton({text}: BookTravelButtonProps) {
const [account] = useOnyx(ONYXKEYS.ACCOUNT);
const primaryLogin = account?.primaryLogin;
const {setRootStatusBarEnabled} = useContext(CustomStatusBarAndBackgroundContext);
const [isMaintenanceModalVisible, setMaintenanceModalVisibility] = useState(false);

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

const hideMaintenanceModal = () => setMaintenanceModalVisibility(false);

const bookATrip = useCallback(() => {
setErrorMessage('');

if (DateUtils.isCurrentTimeWithinRange(SPOTNANA_BLACKOUT_PERIOD_START, SPOTNANA_BLACKOUT_PERIOD_END)) {
setMaintenanceModalVisibility(true);
return;
}

// The primary login of the user is where Spotnana sends the emails with booking confirmations, itinerary etc. It can't be a phone number.
if (!primaryLogin || Str.isSMSLogin(primaryLogin)) {
setErrorMessage(translate('travel.phoneError'));
Expand Down Expand Up @@ -130,15 +116,6 @@ function BookTravelButton({text}: BookTravelButtonProps) {
success
large
/>
<ConfirmModal
title={translate('travel.maintenance.title')}
onConfirm={hideMaintenanceModal}
onCancel={hideMaintenanceModal}
isVisible={isMaintenanceModalVisible}
prompt={translate('travel.maintenance.message')}
confirmText={translate('common.buttonConfirm')}
shouldShowCancelButton={false}
/>
</>
);
}
Expand Down
4 changes: 0 additions & 4 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2640,10 +2640,6 @@ const translations = {
title: 'Get started with Expensify Travel',
message: `You'll need to use your work email (e.g., name@company.com) with Expensify Travel, not your personal email (e.g., name@gmail.com).`,
},
maintenance: {
title: 'Expensify Travel is getting an upgrade! 🚀',
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!`,
},
},
workspace: {
common: {
Expand Down
4 changes: 0 additions & 4 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2664,10 +2664,6 @@ const translations = {
title: 'Comienza con Expensify Travel',
message: 'Tendrás que usar tu correo electrónico laboral (por ejemplo, nombre@empresa.com) con Expensify Travel, no tu correo personal (por ejemplo, nombre@gmail.com).',
},
maintenance: {
title: '¡Expensify Travel está recibiendo una actualización! 🚀',
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!`,
},
},
workspace: {
common: {
Expand Down