diff --git a/src/Components/StatsBar.js b/src/Components/StatsBar.js index 0572d3f89199ec0096cfb582b681888cf02e9168..0cdde4942b065244271cb8e5c82f44e0e96d36d2 100644 --- a/src/Components/StatsBar.js +++ b/src/Components/StatsBar.js @@ -18,6 +18,8 @@ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/> import React, {Component} from 'react'; import {Col,Row, Container} from 'react-grid-system'; +import { apiUrl } from "../env"; +import axios from "axios"; import mapaBrasil from '../img/mapa-brasil-line-icon.svg'; const brasilStyle={ backgroundColor: "#00bcd4", @@ -41,6 +43,21 @@ const statistcStyle={ }; class StatsBar extends Component{ + constructor(props){ + super(props) + this.state ={ + available_resources: 0, + month_publications:0, + month_downloads:0 + } + } + componentDidMount(){ + // https://api.portalmec.c3sl.ufpr.br/v1/statistics + axios.get(`${apiUrl}/statistics`).then((res) => { + this.setState({available_resources:res.data.count, month_publications:res.data.month_publications, month_downloads:res.data.month_downloads}) + }) + } + render(){ return( <div style={brasilStyle}> @@ -50,7 +67,7 @@ class StatsBar extends Component{ <img src={mapaBrasil} height="83px" alt="mapa do brasil"/> <span style={statistcStyle}> <span style={numberStyle}> - 31061 + {this.state.available_resources} </span> <span> Recursos disponÃveis @@ -62,13 +79,13 @@ class StatsBar extends Component{ ESSE MÊS: <span style={statistcStyle}> <span style={numberStyle}> - 10 + {this.state.month_downloads} </span> Baixados </span> <span style={statistcStyle}> <span style={numberStyle}> - 1 + {this.state.month_publications} </span> Publicados </span> diff --git a/src/Pages/AboutPage.js b/src/Pages/AboutPage.js index e8c57d2e26d0b765e23b021e57ff7edd3d4f026a..a69e23ffdc5cdec3961260594f6bca51d5f38c33 100644 --- a/src/Pages/AboutPage.js +++ b/src/Pages/AboutPage.js @@ -579,7 +579,7 @@ export default function AboutPage(props) { <link href="https://fonts.googleapis.com/css?family=Pompiere|Roboto:300,400&display=swap" rel="stylesheet"/> <Secao1> - <iframe title="VÃdeo página sobre" src="https://player.vimeo.com/video/231609051" width="100%" height="100%" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe> + <iframe title="VÃdeo página sobre" src="https://player.vimeo.com/video/231609051" width="100%" height="100%" frameborder="0" allow="autoplay; fullscreen" allowFullScreen></iframe> </Secao1>