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

Commit a2d2478

Browse files
committed
clean the mass (console.log , f-word ...)
1 parent 788aa65 commit a2d2478

File tree

13 files changed

+65
-55
lines changed

13 files changed

+65
-55
lines changed

components/Button/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@ import { makeDebugger } from '../../utils/functions'
1616
const debug = makeDebugger('c:Button:index')
1717
/* eslint-enable no-unused-vars */
1818

19-
const Button = ({ children }) => {
20-
return <MButton>{children}</MButton>
19+
const Button = ({ children, size }) => {
20+
return <MButton size={size}>{children}</MButton>
2121
}
2222

2323
MButton.propTypes = {
2424
children: PropTypes.string,
25+
size: PropTypes.oneOf(['default', 'large', 'small']),
2526
}
2627

2728
MButton.defaultProps = {
2829
children: '..?..',
30+
size: 'default',
2931
}
3032

3133
export default Button

components/Button/styles/index.js

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
1-
import styled, { injectGlobal } from 'styled-components'
2-
1+
import styled from 'styled-components'
32
import { Button } from 'antd'
43

4+
import { theme } from '../../../utils/themes'
5+
56
const MButton = styled(Button)`
6-
color: tomato;
7+
color: ${theme('button.fg')};
8+
background: ${theme('button.bg')};
9+
border-color: ${theme('button.border')};
710
&:hover {
8-
color: tomato;
9-
border-color: tomato;
11+
color: ${theme('button.fg')};
12+
border-color: ${theme('button.border')};
13+
background: ${theme('button.hover')};
1014
}
1115
&:focus {
12-
color: tomato;
13-
border-color: tomato;
16+
color: ${theme('button.fg')};
17+
border-color: ${theme('button.border')};
18+
background: ${theme('button.focus')};
1419
}
1520
&:active {
16-
color: tomato;
17-
border-color: tomato;
21+
color: ${theme('button.fg')};
22+
border-color: ${theme('button.border')};
23+
background: ${theme('button.active')};
1824
}
1925
`
2026

2127
/* eslint-disable no-unused-expressions */
22-
// TODO: move to global
23-
injectGlobal`
24-
.ant-btn-clicked:after {
25-
border: 0 solid tomato;
26-
}
27-
`
28+
// injectGlobal`
29+
// .ant-btn-clicked:after {
30+
// border: 0 solid ${color})};
31+
// }
32+
// `
2833
/* eslint-enable no-unused-expressions */
2934

3035
export default MButton

containers/Decrator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const selector = ({ store }) => ({
4040

4141
const ThemeObserver = ({ children, theme }) => (
4242
<ThemeProvider theme={theme.themeData}>
43-
<Container className="fuck">
43+
<Container>
4444
<style jsx global>
4545
{globalStyles}
4646
</style>

containers/Doraemon/logic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export function init(selectedStore) {
198198
initCmdResolver()
199199

200200
pockect$.cmdSuggesttion().subscribe(res => {
201-
debug('--> loadSuggestions res: ', res)
201+
// debug('--> loadSuggestions res: ', res)
202202
store.loadSuggestions(res)
203203
})
204204

containers/GithubSearchPanel/Pigeon.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import 'rxjs/add/operator/filter'
1515
import R from 'ramda'
1616
import fetch from 'isomorphic-fetch'
1717

18-
export const fuck = 1
1918
const QUERY_REPOS =
2019
'https://api.github.com/search/repositories?sort=stars&order=desc&q='
2120

@@ -34,7 +33,7 @@ const getGithubRepos = R.curry(getRepos)
3433
const isEmptyValue = R.compose(R.isEmpty, R.trim)
3534
const isNotEmptyValue = R.compose(R.not, isEmptyValue)
3635

37-
export class SearchService {
36+
export default class SearchService {
3837
constructor() {
3938
this.searchTerm = new Subject()
4039
// this.doSearch = R.curry(this.githubQuery)

containers/GithubSearchPanel/logic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import R from 'ramda'
22

33
import { makeDebugger } from '../../utils/functions'
4-
import { SearchService } from './Pigeon'
4+
import SearchService from './Pigeon'
55

66
const debug = makeDebugger('L:UniversePanel')
77

containers/IntroBody/ThemeSelector.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ export const ThemeSelector = styled.div`
3737

3838
// ${props => 'x')}
3939
// ${props => (props.active ? '✓' : 'x')}
40-
// const Fuck = <Flex><ThemeSelector></Flex>

stores/DoraemonStore/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const DoraemonStore = t
5757
return getParent(self)
5858
},
5959
get allSuggestions() {
60-
// console.log('fuck cmds: ', cmds)
6160
return R.mergeAll([self.root.communities.all, mapKeys(R.toLower, cmds)])
6261
},
6362
get communities() {
Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
11
export { default as pl } from './pl'
22
export { default as framework } from './framework'
33
export { default as database } from './database'
4-
5-
// '/ruby': { page: '/', query: { name: 'ruby' } },
6-
/*
7-
const route = {}
8-
R.forEachObjIndexed(v => {
9-
route[v.raw] = { page: '/', query: { name: `${v.raw}` } }
10-
}, pl)
11-
12-
const fuck = mapKeys(R.toLower, route)
13-
const fuck2 = mapKeys(k => `'/${k}'`, fuck)
14-
15-
// console.log('config pl: ', pl)
16-
17-
// console.log('fuck: ', fuck)
18-
// console.log('fuck: ', fuck2)
19-
*/
20-
21-
// export const communityRoutes = fuck2

stores/ThemeStore/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
import { types as t, getParent } from 'mobx-state-tree'
77
import R from 'ramda'
88

9-
// import { makeDebugger } from '../../utils/functions'
10-
import { markStates } from '../../utils/functions'
9+
import { makeDebugger, markStates } from '../../utils/functions'
1110
import { themeDict } from '../../utils/themes'
1211

13-
// const debug = makeDebugger('S:ThemeStore')
12+
/* eslint-disable no-unused-vars */
13+
const debug = makeDebugger('S:ThemeStore')
14+
/* eslint-enable no-unused-vars */
1415

1516
export const ThemeDefaults = {
1617
curTheme: 'default',

0 commit comments

Comments
 (0)