commit e49b185333f9c608a338185e05b56c6d49652097
parent 03fb72e7ce6b652d1fc76a2501ee1c4d4f53a063
Author: Yureka <yuka@yuka.dev>
Date: Thu, 3 Feb 2022 12:57:20 +0100
parent 03fb72e7ce6b652d1fc76a2501ee1c4d4f53a063
Author: Yureka <yuka@yuka.dev>
Date: Thu, 3 Feb 2022 12:57:20 +0100
indentation
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/client/src/searchView.js b/client/src/searchView.js @@ -227,9 +227,9 @@ export const search = async (requestId) => { const data = await get('locations', {'query': fromValue, 'results': 1}, true); if (!data[0]) { - showAlertModal('Invalid From'); + showAlertModal('Invalid From'); return; - } + } from = data[0]; } @@ -257,7 +257,7 @@ export const search = async (requestId) => { if (!data[0]) { showAlertModal('Invalid To'); return; - } + } to = data[0]; } @@ -290,11 +290,11 @@ export const search = async (requestId) => { }; const suggestionsTemplate = (data, inputId) => html` - <div class="suggestionsbox" @mouseover=${mouseOverSuggestions} @mouseout=${stopMouseOverSuggestions}> - ${data.map(element => html` - <p class="suggestion" @click=${() => setSuggestion(encodeURI(JSON.stringify(element)), inputId)}>${parseName(element)}</p> - `)} - </div> + <div class="suggestionsbox" @mouseover=${mouseOverSuggestions} @mouseout=${stopMouseOverSuggestions}> + ${data.map(element => html` + <p class="suggestion" @click=${() => setSuggestion(encodeURI(JSON.stringify(element)), inputId)}>${parseName(element)}</p> + `)} + </div> `; const loadSuggestions = async (e, input) => {