forked from Gitlink/forgeplus-react
issue
This commit is contained in:
parent
bc8e513b97
commit
7fb7dbe687
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,6 +243,7 @@ class Infos extends Component {
|
|||
id={user.login}
|
||||
fontClass={"font-14 ml5"}
|
||||
starText={"关注TA"}
|
||||
notReset={true}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
@ -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}>
|
||||
|
|
|
@ -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>
|
||||
) : (
|
||||
|
|
Loading…
Reference in New Issue