diff --git a/.env b/.env index f70f84e..d121a32 100644 --- a/.env +++ b/.env @@ -7,3 +7,5 @@ REACT_APP_APIGATE='http://float-gat.dev.chiefsoft.net' REACT_APP_APPLE_LINK='https://apps.apple.com/us/app/float-mobility/id1465369130' REACT_APP_GOOGLE_PLAY_LINK='https://apps.apple.com/us/app/float-mobility/id1465369130' + +REACT_APP_SITE_ENDPOINT='https://float-gat.dev.chiefsoft.net/en/floatweb/api/v1/' \ No newline at end of file diff --git a/src/App.js b/src/App.js index 2b831b7..3618bac 100644 --- a/src/App.js +++ b/src/App.js @@ -20,14 +20,6 @@ import GetStarted from './pages/GetStarted'; import FindEv from "./pages/FindEv"; import FindMobility from "./pages/FindMobility"; - - -// import { -// BrowserRouter as Router, -// Routes, -// Route -// } from "react-router-dom"; - import { Routes, Route } from "react-router-dom"; diff --git a/src/pages/Faqs.js b/src/pages/Faqs.js index 224ba64..7e50612 100644 --- a/src/pages/Faqs.js +++ b/src/pages/Faqs.js @@ -1,26 +1,48 @@ import React, {Component} from 'react'; +import SiteService from './assests/utils/SiteService'; -class Faqs extends React.Component { +class Faqs extends Component { + constructor({data, loading, error}){ + super({data, loading, error}) + this.state = { + data: null, + loading: true, + error: null + } + } + + async componentDidMount() { + const apiCall = new SiteService + try { + const data = await apiCall.faqData(); + + this.setState = { + data: data, + loading: false + } + } catch (error) { + this.setState = { + error: error, + loading: false + } + } + } render() { + const {data, loading, error} = this.state + console.log(data) + console.log(error) return(