work, but this time visable

pull/6/head
Dylan Regan 2021-11-11 20:49:11 -05:00
parent ca9923c081
commit 76b0c674da
3 changed files with 9 additions and 17 deletions

View File

@ -13,6 +13,11 @@
}
}
#frontPage {
color: blue;
text-align: center;
}
.App-header {
background-color: #282c34;
min-height: 100vh;

View File

@ -11,27 +11,14 @@ class App extends Component {
asyncCall = async () => {
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() {
console.log(this.asyncCall());
return (
<div>
<div className="h1 bg-secondary text-white text-center p-2">
{ this.state.message }
</div>
<div className="text-center">
<button className="btn btn-secondary" onClick={this.updateContent}>
Click me
</button>
<div id="frontPage">
<h1>Free Programming Books</h1>
<input type="text"></input>
</div>
</div>
);

View File

@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import './App.css';
import App from './App';
import reportWebVitals from './reportWebVitals';