work, but this time visable
parent
ca9923c081
commit
76b0c674da
|
@ -13,6 +13,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#frontPage {
|
||||||
|
color: blue;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.App-header {
|
.App-header {
|
||||||
background-color: #282c34;
|
background-color: #282c34;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
19
src/App.js
19
src/App.js
|
@ -12,26 +12,13 @@ class App extends Component {
|
||||||
return axios.get('https://raw.githubusercontent.com/Senior-Design-2021-Ebook-Team/markdown-parser/main/fpb.json');
|
return axios.get('https://raw.githubusercontent.com/Senior-Design-2021-Ebook-Team/markdown-parser/main/fpb.json');
|
||||||
}
|
}
|
||||||
|
|
||||||
updateContent = () => {
|
|
||||||
if (this.state.message === "Default Content") {
|
|
||||||
this.setState({ message: "Updated Content!"});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.setState({ message: "Default Content"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
console.log(this.asyncCall());
|
console.log(this.asyncCall());
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="h1 bg-secondary text-white text-center p-2">
|
<div id="frontPage">
|
||||||
{ this.state.message }
|
<h1>Free Programming Books</h1>
|
||||||
</div>
|
<input type="text"></input>
|
||||||
<div className="text-center">
|
|
||||||
<button className="btn btn-secondary" onClick={this.updateContent}>
|
|
||||||
Click me
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import './index.css';
|
import './App.css';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
import reportWebVitals from './reportWebVitals';
|
import reportWebVitals from './reportWebVitals';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue