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

Commit 03a1966

Browse files
committed
chore(clean up): rm sync button from GithubPageViewer, closes #498
1 parent 395d5b4 commit 03a1966

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

components/GithubRepoPage/index.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
ReadmeWrapper,
2323
Footer,
2424
SearchButton,
25-
SyncButton,
2625
PublishButton,
2726
ReadonlyHolder,
2827
} from './styles'
@@ -35,10 +34,8 @@ const GithubRepoPage = ({
3534
updating,
3635
onSearch,
3736
onPublish,
38-
onSync,
3937
showPublishBtn,
4038
showSearchBtn,
41-
showSyncBtn,
4239
viewerHeader,
4340
bodyHeader,
4441
publishing,
@@ -62,17 +59,12 @@ const GithubRepoPage = ({
6259
<MarkDownRender body={repo.readme || ''} />
6360
</ReadmeWrapper>
6461
</BodyWrapper>
65-
<Footer show={showSearchBtn || showSyncBtn || showPublishBtn}>
62+
<Footer show={showSearchBtn || showPublishBtn}>
6663
<Maybe test={showSearchBtn}>
6764
<SearchButton type="primary" ghost onClick={onSearch}>
6865
重新搜索
6966
</SearchButton>
7067
</Maybe>
71-
<Maybe test={showSyncBtn}>
72-
<SyncButton type="primary" ghost onClick={onSync}>
73-
同步仓库
74-
</SyncButton>
75-
</Maybe>
7668
<Maybe test={showPublishBtn}>
7769
{publishing ? (
7870
<PublishButton type="primary">发布中...</PublishButton>
@@ -91,11 +83,9 @@ GithubRepoPage.propTypes = {
9183
updating: T.bool,
9284
onPublish: T.func,
9385
onSearch: T.func,
94-
onSync: T.func,
9586

9687
showPublishBtn: T.bool,
9788
showSearchBtn: T.bool,
98-
showSyncBtn: T.bool,
9989

10090
viewerHeader: T.node,
10191
bodyHeader: T.node,
@@ -108,11 +98,9 @@ GithubRepoPage.defaultProps = {
10898
updating: false,
10999
onPublish: log,
110100
onSearch: log,
111-
onSync: log,
112101

113102
showPublishBtn: false,
114103
showSearchBtn: false,
115-
showSyncBtn: false,
116104
viewerHeader: <div />,
117105
bodyHeader: <div />,
118106

components/GithubRepoPage/styles/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ export const Footer = styled.div`
4747
export const SearchButton = styled(Button)`
4848
margin-right: 10px;
4949
`
50-
export const SyncButton = styled(Button)`
51-
margin-right: 10px;
52-
`
5350
export const PublishButton = styled(Button)``
5451

5552
export const ReadonlyHolder = styled.div`

0 commit comments

Comments
 (0)