refactor: ♻️ Remove api key of tsx files
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
import {
|
||||
IonContent,
|
||||
IonPage,
|
||||
IonIcon,
|
||||
IonCard,
|
||||
IonInput,
|
||||
IonRow,
|
||||
IonCardContent,
|
||||
IonButton,
|
||||
IonSearchbar,
|
||||
IonModal,
|
||||
IonProgressBar,
|
||||
IonCard,
|
||||
IonCardContent,
|
||||
IonContent,
|
||||
IonIcon,
|
||||
IonPage,
|
||||
IonRow,
|
||||
} from "@ionic/react";
|
||||
import {
|
||||
arrowBack,
|
||||
arrowForwardOutline,
|
||||
chevronForwardOutline,
|
||||
locateOutline,
|
||||
@@ -22,7 +17,6 @@ import {
|
||||
import "./BuscarTransporte.css";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { autoCompleteAddress } from "../../services/utils";
|
||||
import { useHistory } from "react-router";
|
||||
|
||||
import GooglePlacesAutocomplete, {
|
||||
@@ -89,7 +83,7 @@ const BuscarTransporte: React.FC = () => {
|
||||
}
|
||||
}, [addressTo]);
|
||||
|
||||
function buscaTransporte(){
|
||||
function buscaTransporte() {
|
||||
if (coordinatesFrom && coordinatesTo && addressFrom && addressTo) {
|
||||
history.push({
|
||||
pathname: "/transportes",
|
||||
@@ -117,7 +111,7 @@ const BuscarTransporte: React.FC = () => {
|
||||
placeholder="R. José Paulino, 1234 - Centro, Campinas - SP, 13013-001"
|
||||
/> */}
|
||||
<GooglePlacesAutocomplete
|
||||
apiKey="AIzaSyAGfCsaNwxwyj4Ajtfy7MTNADE6JwmnZvA"
|
||||
apiKey={process.env.REACT_APP_KEY_API}
|
||||
apiOptions={{ language: "pt-br", region: "br" }}
|
||||
selectProps={{
|
||||
value: addressFrom,
|
||||
@@ -136,7 +130,7 @@ const BuscarTransporte: React.FC = () => {
|
||||
placeholder="PUC Campinas"
|
||||
/> */}
|
||||
<GooglePlacesAutocomplete
|
||||
apiKey="AIzaSyAGfCsaNwxwyj4Ajtfy7MTNADE6JwmnZvA"
|
||||
apiKey={process.env.REACT_APP_KEY_API}
|
||||
apiOptions={{ language: "pt-br", region: "br" }}
|
||||
selectProps={{
|
||||
value: addressTo,
|
||||
@@ -147,10 +141,7 @@ const BuscarTransporte: React.FC = () => {
|
||||
/>
|
||||
</div>
|
||||
<div className="button-search">
|
||||
<IonButton
|
||||
color="primary"
|
||||
onClick={() => buscaTransporte()}
|
||||
>
|
||||
<IonButton color="primary" onClick={() => buscaTransporte()}>
|
||||
Buscar
|
||||
</IonButton>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,7 @@ export default function CadastrarItinerario() {
|
||||
<div className="inputs-from-to">
|
||||
<IonIcon icon={locateOutline}></IonIcon>
|
||||
<GooglePlacesAutocomplete
|
||||
apiKey="AIzaSyAGfCsaNwxwyj4Ajtfy7MTNADE6JwmnZvA"
|
||||
apiKey={process.env.REACT_APP_KEY_API}
|
||||
apiOptions={{ language: "pt-br", region: "br" }}
|
||||
selectProps={{
|
||||
className: "input-autocomplete",
|
||||
@@ -55,7 +55,7 @@ export default function CadastrarItinerario() {
|
||||
<div className="inputs-from-to">
|
||||
<IonIcon icon={locationOutline}></IonIcon>
|
||||
<GooglePlacesAutocomplete
|
||||
apiKey="AIzaSyAGfCsaNwxwyj4Ajtfy7MTNADE6JwmnZvA"
|
||||
apiKey={process.env.REACT_APP_KEY_API}
|
||||
apiOptions={{ language: "pt-br", region: "br" }}
|
||||
selectProps={{
|
||||
className: "input-autocomplete",
|
||||
|
||||
Reference in New Issue
Block a user