container insertion issues

This commit is contained in:
2020-06-07 23:27:31 +02:00
parent ed0df26a79
commit 21ccd165c2
4 changed files with 23 additions and 23 deletions

View File

@ -2,7 +2,6 @@ import React from "react";
import SideBar from "../elements/SideBar";
import Tag from "../elements/Tag";
import "../css/CategoryPage.css"
import {TagPreview} from "../elements/Preview";
class CategoryPage extends React.Component {
@ -39,21 +38,23 @@ class CategoryPage extends React.Component {
<hr/>
<button className='btn btn-success'>Add a new Tag!</button>
</SideBar>
<div id='categorycontent'>
{!this.state.selected ?
(this.state.loadedtags ?
this.state.loadedtags.map((m) => (
<TagPreview
name={m.tag_name}
tag_id={m.tag_id}
viewbinding={this.props.viewbinding}
categorybinding={this.setPage}/>
)) :
"loading") :
this.selectionelements
}
</div>
{!this.state.selected ?
(<div className='maincontent'>
{this.state.loadedtags ?
this.state.loadedtags.map((m) => (
<TagPreview
name={m.tag_name}
tag_id={m.tag_id}
viewbinding={this.props.viewbinding}
categorybinding={this.setPage}/>
)) :
"loading"}
</div>) :
this.selectionelements
}
</>
);
}

View File

@ -84,7 +84,10 @@ class Player extends React.Component {
</button>
{this.state.popupvisible ?
<AddTagPopup show={this.state.popupvisible}
onHide={() => this.setState({popupvisible: false})}
onHide={() => {
this.setState({popupvisible: false});
this.fetchMovieData();
}}
movie_id={this.state.movie_id}/> :
null
}