Commit 015d816f by OuiAtichat

Auto stash before merge of "dev" and "origin/dev"

parent ecdb062a
import React, { Component } from 'react'; import React, { Component } from 'react';
import app, { db } from '../firebase'; import app, { db } from '../firebase';
import { Row, Container, Col } from 'react-bootstrap'; import { Row, Container } from 'react-bootstrap';
import DataTable from '../components/DataTable'; import DataTable from '../components/DataTable';
import NavBar from '../components/NavBar'; import NavBar from '../components/NavBar';
import DataCard, { SmCard } from '../components/DataCard'; import DataCard from '../components/DataCard';
import GetDataSelection from '../components/GetDataSelection/GetDataSelection'; import GetDataSelection from '../components/GetDataSelection/GetDataSelection';
import Mapbox from '../components/Mapbox'; import Mapbox from '../components/Mapbox';
import axios from 'axios'; import axios from 'axios';
...@@ -92,7 +92,6 @@ class Home extends Component { ...@@ -92,7 +92,6 @@ class Home extends Component {
const configData = await db.collection('config').get(); const configData = await db.collection('config').get();
//get all data from collection 'config' //get all data from collection 'config'
configData.forEach(doc => { configData.forEach(doc => {
console.log(doc.data());
this.setState({ this.setState({
kairosUrl: doc.data().kairosUrl, kairosUrl: doc.data().kairosUrl,
userToken: doc.data().userToken, userToken: doc.data().userToken,
...@@ -141,6 +140,7 @@ class Home extends Component { ...@@ -141,6 +140,7 @@ class Home extends Component {
console.log(q_data); console.log(q_data);
try { try {
axios.defaults.headers.common['Authorization'] = `Bearer ${userToken}`;
const response = await axios.post(kairosUrl, q_data); const response = await axios.post(kairosUrl, q_data);
console.log(response.data.queries[0].results); console.log(response.data.queries[0].results);
this.setState({ this.setState({
......
...@@ -6,7 +6,7 @@ import withWindowDimensions from '../utils/withWindowDimensions'; ...@@ -6,7 +6,7 @@ import withWindowDimensions from '../utils/withWindowDimensions';
import { CSVLink } from 'react-csv'; import { CSVLink } from 'react-csv';
import moment from 'moment'; import moment from 'moment';
export const SmCard = props => { const SmCard = props => {
const smdata = props.smitem; const smdata = props.smitem;
const iconStyle = { style: { height: '1.5em', width: '1.5em' } }; const iconStyle = { style: { height: '1.5em', width: '1.5em' } };
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment