This commit is contained in:
caishi 2021-09-03 14:46:06 +08:00
parent bc8e513b97
commit 7fb7dbe687
5 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,6 @@ function FocusButton({is_watch , fontClass, starText, is_block , id , successFun
}).then((result) => {
if (result && result.data.status === 0) {
successFunc && successFunc();
console.log(notReset);
if(notReset){
setWatchFlag(!watchFlag);
}

View File

@ -7,7 +7,6 @@ import "./list.css";
class UserList extends Component {
renderList = (users, userClass, current_user, type_title , successFunc , notReset) => {
console.log("user:",notReset)
if (users && users.length > 0) {
return users.map((item, key) => {
return (
@ -54,9 +53,9 @@ class UserList extends Component {
}
}
render() {
const { users, userClass, current_user , type_title , successFunc , notReset } = this.props;
const { users, userClass, current_user , type_title , successFunc , notReset , title_type } = this.props;
return (
this.renderList(users, userClass, current_user, type_title , successFunc , notReset)
this.renderList(users, userClass, current_user, type_title , successFunc , notReset , title_type)
);
}
}

View File

@ -243,6 +243,7 @@ class Infos extends Component {
id={user.login}
fontClass={"font-14 ml5"}
starText={"关注TA"}
notReset={true}
/>
</div>
)}

View File

@ -15,7 +15,7 @@ function Team(props){
const [ sort_direction , setSort_direction ] = useState("asc");
const [ sort_by ,setSort_by ] = useState("created_at");
const [ search ,setSearch ] = useState(undefined);
const { checkIfLogin , showLoginDialog } = props;
const { checkIfLogin , showLoginDialog , current_user } = props;
const { username } = props.match.params;
useEffect(()=>{
if(username){
@ -57,7 +57,7 @@ function Team(props){
</div>
<p>
{
checkIfLogin() &&
current_user && current_user.login === username &&
<CheckProfile {...props} sureFunc={()=>{props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</CheckProfile>
}
<Dropdown overlay={menu}>

View File

@ -116,7 +116,8 @@ class CommonList extends Component {
type_title={'关注列表'}
current_user={current_user}
successFunc={this.successFunc}
notReset={userType === "watch_users"?false:true}
notReset={(userType === "watch_users" && title_type === "我") ? false : true}
title_type={title_type}
/>
</div>
) : (