Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
toiletcoin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
toiletcoin
Commits
015d816f
Commit
015d816f
authored
Aug 06, 2019
by
OuiAtichat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto stash before merge of "dev" and "origin/dev"
parent
ecdb062a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/Pages/Home.js
+3
-3
src/components/DataCard.js
+1
-1
No files found.
src/Pages/Home.js
View file @
015d816f
import
React
,
{
Component
}
from
'react'
;
import
app
,
{
db
}
from
'../firebase'
;
import
{
Row
,
Container
,
Col
}
from
'react-bootstrap'
;
import
{
Row
,
Container
}
from
'react-bootstrap'
;
import
DataTable
from
'../components/DataTable'
;
import
NavBar
from
'../components/NavBar'
;
import
DataCard
,
{
SmCard
}
from
'../components/DataCard'
;
import
DataCard
from
'../components/DataCard'
;
import
GetDataSelection
from
'../components/GetDataSelection/GetDataSelection'
;
import
Mapbox
from
'../components/Mapbox'
;
import
axios
from
'axios'
;
...
...
@@ -92,7 +92,6 @@ class Home extends Component {
const
configData
=
await
db
.
collection
(
'config'
).
get
();
//get all data from collection 'config'
configData
.
forEach
(
doc
=>
{
console
.
log
(
doc
.
data
());
this
.
setState
({
kairosUrl
:
doc
.
data
().
kairosUrl
,
userToken
:
doc
.
data
().
userToken
,
...
...
@@ -141,6 +140,7 @@ class Home extends Component {
console
.
log
(
q_data
);
try
{
axios
.
defaults
.
headers
.
common
[
'Authorization'
]
=
`Bearer
${
userToken
}
`
;
const
response
=
await
axios
.
post
(
kairosUrl
,
q_data
);
console
.
log
(
response
.
data
.
queries
[
0
].
results
);
this
.
setState
({
...
...
src/components/DataCard.js
View file @
015d816f
...
...
@@ -6,7 +6,7 @@ import withWindowDimensions from '../utils/withWindowDimensions';
import
{
CSVLink
}
from
'react-csv'
;
import
moment
from
'moment'
;
export
const
SmCard
=
props
=>
{
const
SmCard
=
props
=>
{
const
smdata
=
props
.
smitem
;
const
iconStyle
=
{
style
:
{
height
:
'1.5em'
,
width
:
'1.5em'
}
};
return
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment