From 64eb62f2e2b8772e5a67bd18734bea1493f9a7ec Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Wed, 6 Dec 2023 10:22:46 -0600 Subject: [PATCH] feat: add back button to mobile location screen --- lib/components/mobile/location-search.js | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/components/mobile/location-search.js b/lib/components/mobile/location-search.js index b58b22536..d0fe1ed3d 100644 --- a/lib/components/mobile/location-search.js +++ b/lib/components/mobile/location-search.js @@ -9,9 +9,13 @@ import React, { Component } from 'react' import styled from 'styled-components' import * as uiActions from '../../actions/ui' +import { ChevronLeft } from '@styled-icons/fa-solid' + import { MobileScreens } from '../../actions/ui-constants' import LocationField from '../form/connected-location-field' +import { StyledIconWrapper } from '../util/styledIcon' + import MobileContainer from './container' import MobileNavigationBar from './navigation-bar' @@ -27,6 +31,14 @@ const MobileLocationField = styled(LocationField)` } ` +const MobileLocationBackButton = styled.button` + background: white; + border: none; + position: absolute; + z-index: 100; + margin-top: 4px; +` + class MobileLocationSearch extends Component { static propTypes = { backScreen: PropTypes.number, @@ -46,6 +58,10 @@ class MobileLocationSearch extends Component { this.props const suppressNearby = otherLocation && otherLocation.category === 'CURRENT_LOCATION' + + const backButtonText = intl.formatMessage({ + id: 'components.BackToTripPlanner.backToTripPlanner' + }) return (
+ + this.props.setMobileScreen(MobileScreens.SEARCH_FORM) + } + title={backButtonText} + > + + + + +