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

default student

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