container insertion issues

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

View File

@ -1,4 +0,0 @@
#categorycontent{
width: 70%;
float: left;
}

View File

@ -4,7 +4,7 @@ import Dropdown from "react-bootstrap/Dropdown";
import DropdownButton from "react-bootstrap/DropdownButton";
class AddTagPopup extends React.Component {
constructor(props: P, context: any) {
constructor(props, context) {
super(props, context);
this.state = {
@ -60,7 +60,6 @@ class AddTagPopup extends React.Component {
<Modal.Footer>
<button className='btn btn-primary' onClick={() => {
this.storeselection();
this.props.onHide();
}}>Add
</button>
</Modal.Footer>
@ -82,6 +81,7 @@ class AddTagPopup extends React.Component {
console.log("error occured while writing to db -- todo error handling");
console.log(result.result);
}
this.props.onHide();
});
}
}

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,9 +38,10 @@ 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 ?
(<div className='maincontent'>
{this.state.loadedtags ?
this.state.loadedtags.map((m) => (
<TagPreview
name={m.tag_name}
@ -49,11 +49,12 @@ class CategoryPage extends React.Component {
viewbinding={this.props.viewbinding}
categorybinding={this.setPage}/>
)) :
"loading") :
"loading"}
</div>) :
this.selectionelements
}
</div>
</>
);
}

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
}