Skip to content
Snippets Groups Projects
Commit 3dda9266 authored by lfr20's avatar lfr20
Browse files

Nothing changed

parent 7f2dd111
No related branches found
No related tags found
6 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system,!32Homologa,!31Fix console error,!27Training materials
...@@ -16,7 +16,7 @@ GNU Affero General Public License for more details. ...@@ -16,7 +16,7 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/
import React, { Component, useState } from "react"; import React, { Component } from "react";
import axios from "axios"; import axios from "axios";
import { apiUrl } from "../env"; import { apiUrl } from "../env";
import "./carousel.css"; import "./carousel.css";
...@@ -32,6 +32,8 @@ import ResourceCardFunction from "./ResourceCardFunction.js"; ...@@ -32,6 +32,8 @@ import ResourceCardFunction from "./ResourceCardFunction.js";
import CollectionCardFunction from "./CollectionCardFunction.js"; import CollectionCardFunction from "./CollectionCardFunction.js";
import colecoes_obj from './FormationMaterialsResources/formationMaterials'; import colecoes_obj from './FormationMaterialsResources/formationMaterials';
import ExpandedMaterial from './ExpandedMaterials'; import ExpandedMaterial from './ExpandedMaterials';
import Zoom from '@material-ui/core/Zoom';
const materials = colecoes_obj(); const materials = colecoes_obj();
...@@ -271,14 +273,20 @@ class SubPages extends Component { ...@@ -271,14 +273,20 @@ class SubPages extends Component {
case "Materiais": case "Materiais":
const HandleExpandMaterial = (id) => { const HandleExpandMaterial = (id) => {
console.log(id); if (id !== this.state.currMaterial.material.id)
this.setState({ this.setState({
currMaterial: { currMaterial: {
open: !this.state.currMaterial.open, open: true,
material: { ...materials[id] } material: { ...materials[id] }
} }
}) })
console.log(this.state.currMaterial) else
this.setState({
currMaterial: {
open: false,
material: {}
}
})
} }
...@@ -345,7 +353,7 @@ class SubPages extends Component { ...@@ -345,7 +353,7 @@ class SubPages extends Component {
</Carousel> </Carousel>
{ {
this.state.currMaterial.open ? this.state.currMaterial.open ?
<ExpandedMaterial material={this.state.currMaterial.material}/> <ExpandedMaterial material={this.state.currMaterial.material} />
: :
null null
} }
......
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