diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index 13850e77..07df9c1c 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -66,6 +66,13 @@ class PackageIndexNEIBannerConcent extends Component { categories:[] } } + componentDidUpdate = (prevProps) => { + if(prevProps.current_user.username!=this.props.current_user.username){ + this.setState({ + contact_name:this.props.current_user.username + }) + } + } componentDidMount() { @@ -82,7 +89,7 @@ class PackageIndexNEIBannerConcent extends Component { deadline_at:moment(data.deadline_at), min_price:data.min_price, max_price:data.max_price, - contact_name:data.contact_name==null?this.props.current_user.username:data.contact_name, + contact_name:data.contact_name==null||data.contact_name==undefined?this.props.current_user.username:data.contact_name, phones:data.contact_phone, attachments:data.attachments,