Commit b659d519 authored by Samson's avatar Samson
Browse files

minor changes

parent 34b4ee64
......@@ -88193,9 +88193,10 @@ function (_Component) {
margin: "5px"
};
 
if (this.state.group == null) {
if (this.state.group == null || isNaN(userID)) {
return null;
} else {
console.log(userID);
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
style: mystyle
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h2", null, "Add new class"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("form", {
......@@ -88231,7 +88232,6 @@ function (_Component) {
var _this6 = this;
 
var content = document.getElementById('info');
content.innerHTML = "";
var url = '/api/course/' + id;
axios__WEBPACK_IMPORTED_MODULE_2___default.a.get(url).then(function (response) {
console.log(response);
......@@ -88241,6 +88241,7 @@ function (_Component) {
});
 
response.data.map(function (item) {
content.innerHTML = "";
var h3 = document.createElement("h3");
var pTime = document.createElement("p");
var pDesc = document.createElement("p");
......@@ -205,10 +205,11 @@ export default class Course extends Component {
const eStyle = {
margin: "5px"
};
if(this.state.group == null){
if(this.state.group == null || isNaN(userID)){
return null;
}
else {
console.log(userID);
return (
<div style={mystyle}>
<h2>Add new class</h2>
......@@ -239,7 +240,7 @@ export default class Course extends Component {
showClass(id){
var content = document.getElementById('info');
content.innerHTML = "";
let url = '/api/course/' + id;
axios.get(url).then(response => {
console.log(response);
......@@ -247,6 +248,7 @@ export default class Course extends Component {
one: response.data
});
response.data.map(item =>{
content.innerHTML = "";
var h3 = document.createElement("h3");
var pTime = document.createElement("p");
var pDesc = document.createElement("p");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment