forked from andrewsjkang/LearnLive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request netlify#2 from andrewsjkang/master
Removed unnecessary css files
- Loading branch information
Showing
9 changed files
with
74 additions
and
81 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,29 @@ | ||
import React, { Component } from 'react'; | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
import Classroom from './components/classroom/Classroom'; | ||
|
||
class LambdaDemo extends Component { | ||
class App extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = {loading: false, msg: null}; | ||
this.state = { | ||
currentView: 'room' | ||
} | ||
} | ||
|
||
handleClick = (e) => { | ||
e.preventDefault(); | ||
switchView() { | ||
var currentView = this.state.currentView; | ||
|
||
this.setState({loading: true}); | ||
fetch('/.netlify/functions/hello') | ||
.then(response => response.json()) | ||
.then(json => this.setState({loading: false, msg: json.msg})); | ||
if (currentView === 'room') { | ||
return <Classroom /> | ||
} | ||
} | ||
|
||
render() { | ||
const {loading, msg} = this.state; | ||
|
||
return <p> | ||
<button onClick={this.handleClick}>{loading ? 'Loading...' : 'Call Lambda'}</button><br/> | ||
<span>{msg}</span> | ||
</p> | ||
} | ||
} | ||
|
||
class App extends Component { | ||
render() { | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<h1 className="App-title">Welcome to React</h1> | ||
</header> | ||
<p className="App-intro"> | ||
To get started, edit <code>src/App.js</code> and save to reload. | ||
</p> | ||
<LambdaDemo/> | ||
<div> | ||
{ this.switchView() } | ||
</div> | ||
); | ||
) | ||
} | ||
} | ||
|
||
export default App; | ||
export default App; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React, { Component } from 'react'; | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
|
||
class LambdaDemo extends Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = {loading: false, msg: null}; | ||
} | ||
|
||
handleClick = (e) => { | ||
e.preventDefault(); | ||
|
||
this.setState({loading: true}); | ||
fetch('/.netlify/functions/hello') | ||
.then(response => response.json()) | ||
.then(json => this.setState({loading: false, msg: json.msg})); | ||
} | ||
|
||
render() { | ||
const {loading, msg} = this.state; | ||
|
||
return <p> | ||
<button onClick={this.handleClick}>{loading ? 'Loading...' : 'Call Lambda'}</button><br/> | ||
<span>{msg}</span> | ||
</p> | ||
} | ||
} | ||
|
||
class App extends Component { | ||
render() { | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<h1 className="App-title">Welcome to React</h1> | ||
</header> | ||
<p className="App-intro"> | ||
To get started, edit <code>src/App.js</code> and save to reload. | ||
</p> | ||
<LambdaDemo/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React, { Component } from 'react'; | ||
|
||
class Classroom extends Component { | ||
render() { | ||
return( | ||
<div> | ||
This is the Classroom! | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Classroom |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.