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 { .App-header {
background-color: #282c34; background-color: #282c34;
min-height: 100vh; min-height: 100vh;

View File

@ -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>
); );

View File

@ -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';