Skip to content
Snippets Groups Projects
Commit 6b5ee202 authored by Henrique Varella Ehrenfried's avatar Henrique Varella Ehrenfried :speech_balloon:
Browse files

Fix statistics bar and iframe in AboutPage

parent c8971f4f
No related branches found
No related tags found
5 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system,!32Homologa,!31Fix console error
......@@ -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>
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment