Commit bab0b025 by FE

Merge branch '00-formal' into dev

parents 5fe5271a 07774ad3
...@@ -11,6 +11,18 @@ class CourseItem extends Component { ...@@ -11,6 +11,18 @@ class CourseItem extends Component {
componentDidMount() { componentDidMount() {
const { time } = this.props; const { time } = this.props;
this.startCountDown(time);
}
componentWillReceiveProps(nextProps) {
const { time: newTime } = nextProps
const { time: oldTime } = this.props;
if(oldTime != newTime) {
this.startCountDown(newTime);
}
}
startCountDown = (time) => {
if(time) { if(time) {
let date = time * 1000, let date = time * 1000,
hours = 0, hours = 0,
......
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