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) => {
|
}).then((result) => {
|
||||||
if (result && result.data.status === 0) {
|
if (result && result.data.status === 0) {
|
||||||
successFunc && successFunc();
|
successFunc && successFunc();
|
||||||
console.log(notReset);
|
|
||||||
if(notReset){
|
if(notReset){
|
||||||
setWatchFlag(!watchFlag);
|
setWatchFlag(!watchFlag);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ import "./list.css";
|
||||||
class UserList extends Component {
|
class UserList extends Component {
|
||||||
|
|
||||||
renderList = (users, userClass, current_user, type_title , successFunc , notReset) => {
|
renderList = (users, userClass, current_user, type_title , successFunc , notReset) => {
|
||||||
console.log("user:",notReset)
|
|
||||||
if (users && users.length > 0) {
|
if (users && users.length > 0) {
|
||||||
return users.map((item, key) => {
|
return users.map((item, key) => {
|
||||||
return (
|
return (
|
||||||
|
@ -54,9 +53,9 @@ class UserList extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
render() {
|
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 (
|
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}
|
id={user.login}
|
||||||
fontClass={"font-14 ml5"}
|
fontClass={"font-14 ml5"}
|
||||||
starText={"关注TA"}
|
starText={"关注TA"}
|
||||||
|
notReset={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -15,7 +15,7 @@ function Team(props){
|
||||||
const [ sort_direction , setSort_direction ] = useState("asc");
|
const [ sort_direction , setSort_direction ] = useState("asc");
|
||||||
const [ sort_by ,setSort_by ] = useState("created_at");
|
const [ sort_by ,setSort_by ] = useState("created_at");
|
||||||
const [ search ,setSearch ] = useState(undefined);
|
const [ search ,setSearch ] = useState(undefined);
|
||||||
const { checkIfLogin , showLoginDialog } = props;
|
const { checkIfLogin , showLoginDialog , current_user } = props;
|
||||||
const { username } = props.match.params;
|
const { username } = props.match.params;
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(username){
|
if(username){
|
||||||
|
@ -57,7 +57,7 @@ function Team(props){
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<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>
|
<CheckProfile {...props} sureFunc={()=>{props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</CheckProfile>
|
||||||
}
|
}
|
||||||
<Dropdown overlay={menu}>
|
<Dropdown overlay={menu}>
|
||||||
|
|
|
@ -116,7 +116,8 @@ class CommonList extends Component {
|
||||||
type_title={'关注列表'}
|
type_title={'关注列表'}
|
||||||
current_user={current_user}
|
current_user={current_user}
|
||||||
successFunc={this.successFunc}
|
successFunc={this.successFunc}
|
||||||
notReset={userType === "watch_users"?false:true}
|
notReset={(userType === "watch_users" && title_type === "我") ? false : true}
|
||||||
|
title_type={title_type}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|
Loading…
Reference in New Issue