File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -209,8 +209,9 @@ const AboutMePage = () => {
209
209
< h3 > Home Address</ h3 >
210
210
< input
211
211
className = "address-input"
212
- type = "text "
212
+ type = "search "
213
213
placeholder = "Enter Home Address"
214
+ enterKeyHint = "search"
214
215
value = { locationInputHome }
215
216
onChange = { handleHomeLocationChange }
216
217
onKeyUp = { e => handleSearchBox ( e , 1 ) }
@@ -239,8 +240,9 @@ const AboutMePage = () => {
239
240
< h3 > Work Address</ h3 >
240
241
< input
241
242
className = "address-input"
242
- type = "text "
243
+ type = "search "
243
244
placeholder = "Enter Work Address"
245
+ enterKeyHint = "search"
244
246
value = { locationInputWork }
245
247
onChange = { handleWorkLocationChange }
246
248
onKeyUp = { e => handleSearchBox ( e , 2 ) }
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import WindSpeedIcon from '../src/assets/WindSpeedIcon.svg'
44
44
import SearchIcon from '../src/assets/search-icon.svg'
45
45
import AIIcon from '../src/assets/ai-icon.svg'
46
46
import SendBtn from '../src/assets/Send-Button.svg'
47
+ import { set } from 'mongoose'
47
48
48
49
let initialFetchDone = false
49
50
@@ -336,15 +337,18 @@ const Home = () => {
336
337
case 1 :
337
338
setLocation ( locationData )
338
339
fetchWeatherData ( locationData . lat , locationData . lon )
340
+ setLocationInput ( suggestion . label )
339
341
break
340
342
case 2 :
341
343
setStartLocation ( locationData )
342
344
if ( endLocation . lat !== 0 && endLocation . lon !== 0 ) {
343
345
RoutingMachine ( locationData , endLocation , vehicleType )
344
346
}
347
+ setStartLocationInput ( suggestion . label )
345
348
break
346
349
case 3 :
347
350
setEndLocation ( locationData )
351
+ setDestinationLocationInput ( suggestion . label )
348
352
if (
349
353
( ( endLocation . lat !== 0 && endLocation . lon !== 0 ) ||
350
354
( locationData . lat !== 0 && locationData . lon !== 0 ) ) &&
You can’t perform that action at this time.
0 commit comments