Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
fix(wiki-thread): load contributor adder twice
Browse files Browse the repository at this point in the history
  • Loading branch information
mydearxym committed May 18, 2019
1 parent f799312 commit bbcc20f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
4 changes: 2 additions & 2 deletions components/ContributorList/index.js
Expand Up @@ -31,9 +31,9 @@ const ContributorList = ({ users, readOnly, addContributor }) => (
}
placement="bottom"
trigger="hover"
key={user.id}
key={user.avatar}
>
<AvatarLink>
<AvatarLink href={user.htmlUrl} target="_blank">
<Avatar src={user.avatar} />
</AvatarLink>
</Popover>
Expand Down
11 changes: 3 additions & 8 deletions containers/WikiThread/Contributors.js
Expand Up @@ -18,7 +18,7 @@ import {
JoinText,
} from './styles/contributors'

import * as logic from './logic'
import { addContributor, syncWikiFromGithub } from './logic'

const Note = ({ communityRaw }) => (
<NoteWrapper>
Expand All @@ -44,7 +44,7 @@ const Contributors = ({ isLogin, users, views, lastSync, communityRaw }) => (
passport="root"
fallbackProps="readOnly"
users={users}
addContributor={logic.addContributor}
addContributor={addContributor}
/>

<FootNote>
Expand All @@ -59,12 +59,7 @@ const Contributors = ({ isLogin, users, views, lastSync, communityRaw }) => (

<br />
{isLogin && (
<Button
size="small"
type="primary"
ghost
onClick={logic.syncWikiFromGithub}
>
<Button size="small" type="primary" ghost onClick={syncWikiFromGithub}>
同步 wiki
</Button>
)}
Expand Down
10 changes: 0 additions & 10 deletions containers/WikiThread/index.js
Expand Up @@ -25,7 +25,6 @@ import {
RightPart,
RightPadding,
PublishBtn,
MobileBottom,
} from './styles'

import { useInit, syncWarnOnClose } from './logic'
Expand Down Expand Up @@ -68,15 +67,6 @@ const WikiThreadContainer = ({ wikiThread }) => {
<LeftPadding />
<LeftPart>
<WikiWrapper>{renderView(wikiData, curView, communityRaw)}</WikiWrapper>
<MobileBottom>
<Contributors
communityRaw={communityRaw}
isLogin={isLogin}
users={wikiData.contributors}
views={wikiData.views}
lastSync={wikiData.lastSync}
/>
</MobileBottom>
</LeftPart>
<RightPart>
<React.Fragment>
Expand Down

0 comments on commit bbcc20f

Please sign in to comment.