Commit 08a018b5 authored by Jiawen Lyu's avatar Jiawen Lyu

default student

parent 46e2c90d
...@@ -18,7 +18,7 @@ class App extends Component { ...@@ -18,7 +18,7 @@ class App extends Component {
messages: [], messages: [],
error: null, error: null,
isLoaded: false, isLoaded: false,
logins: [], logins: ["lyujiawe"],
uvs: [] uvs: []
}; };
addMessage(message) { addMessage(message) {
...@@ -48,7 +48,7 @@ class App extends Component { ...@@ -48,7 +48,7 @@ class App extends Component {
const { currentTimeFormatState, messages, logins } = this.state; const { currentTimeFormatState, messages, logins } = this.state;
return ( return (
<div> <div>
<header>nihao</header> <header>SR03</header>
<div class="clearfix wrapper"> <div class="clearfix wrapper">
<div class="main"> <div class="main">
<div className="scheduler-container"> <div className="scheduler-container">
...@@ -56,6 +56,7 @@ class App extends Component { ...@@ -56,6 +56,7 @@ class App extends Component {
timeFormatState={currentTimeFormatState} timeFormatState={currentTimeFormatState}
onDataUpdated={this.logDataUpdate} onDataUpdated={this.logDataUpdate}
id="schedule" id="schedule"
logins={logins}
/> />
</div> </div>
<MessageArea messages={messages} /> <MessageArea messages={messages} />
......
...@@ -10,14 +10,14 @@ export default WrappedComponent => { ...@@ -10,14 +10,14 @@ export default WrappedComponent => {
}; };
} }
componentDidMount() { componentDidMount() {
fetch('https://cors-anywhere.herokuapp.com/https://webapplis.utc.fr/Edt_ent_rest/myedt/result/?login=jbarthel') fetch(`https://cors-anywhere.herokuapp.com/https://webapplis.utc.fr/Edt_ent_rest/myedt/result/?login=${this.props.logins[0]}`)
.then(res => res.json()) .then(res => res.json())
.then( .then(
(result) => { (result) => {
this.setState({ this.setState({
isLoaded: true, isLoaded: true,
data: result, data: result,
login: "jbarthel" login: this.props.logins[0]
}); });
}, },
(error) => { (error) => {
......
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