hjm 6 years ago
commit 68a5c601a6

@ -64,6 +64,15 @@ class CoursesBanner extends Component {
} }
} }
componentDidUpdate = (prevProps) => {
if(prevProps.current_user!=this.props.current_user){
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}
}
onloadupdatabanner=()=>{ onloadupdatabanner=()=>{
this.updatabanner() this.updatabanner()
} }
@ -344,16 +353,7 @@ class CoursesBanner extends Component {
render() { render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state; let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,user_phone_binded} = this.state;
try {
if(this.props.current_user!==undefined){
this.setState({
user_phone_binded :this.props.current_user.user_phone_binded,
})
}
}catch (e) {
console.log("CoursesBanner 354")
console.log(e)
}
return ( return (
<div> <div>
<Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication> <Trialapplication {...this.state} user_phone_binded={user_phone_binded} ></Trialapplication>

Loading…
Cancel
Save