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