Skip to content

Commit f5e7720

Browse files
committed
Code style changes: use Airbnb React/JSX Style Guide
1 parent e64132e commit f5e7720

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
lines changed

src/frontend/component/App.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React from 'react'
2-
import PurpleAppBar from './PurpleAppBar.js' // AppBar with simple overrides
3-
import SuccessButton from './SuccessButton.js' // A button with complex overrides
4-
import { Button } from 'react-toolbox/lib/button' // Bundled component import
1+
import React from 'react';
2+
import PurpleAppBar from './PurpleAppBar.js'; // AppBar with simple overrides
3+
import SuccessButton from './SuccessButton.js'; // A button with complex overrides
4+
import { Button } from 'react-toolbox/lib/button'; // Bundled component import
55

66
const App = () => (
77
<div>
@@ -11,6 +11,6 @@ const App = () => (
1111
<Button label='Primary Button' primary />
1212
</section>
1313
</div>
14-
)
14+
);
1515

16-
export default App
16+
export default App;

src/frontend/component/Logo.js

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import React, { PropTypes } from 'react'
2-
import { AppBar } from 'react-toolbox/lib/app_bar'
3-
import Logo from './Logo.js'
4-
import theme from './PurpleAppBar.css'
1+
import React, { PropTypes } from 'react';
2+
import { AppBar } from 'react-toolbox/lib/app_bar';
3+
import Logo from './Logo.js';
4+
import theme from './PurpleAppBar.css';
55

66
const PurpleAppBar = ({ children, ...other }) => (
77
<AppBar {...other} theme={theme}>
88
<Logo /> App Example
99
{children}
1010
</AppBar>
11-
)
11+
);
1212

1313
PurpleAppBar.propTypes = {
1414
children: PropTypes.node
15-
}
15+
};
1616

17-
export default PurpleAppBar
17+
export default PurpleAppBar;
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from 'react'
2-
import { Button } from 'react-toolbox/lib/button'
3-
import theme from './SuccessButton.css'
1+
import React from 'react';
2+
import { Button } from 'react-toolbox/lib/button';
3+
import theme from './SuccessButton.css';
44

5-
const SuccessButton = (props) => <Button {...props} theme={theme} />
6-
export default SuccessButton
5+
const SuccessButton = (props) => <Button {...props} theme={theme} />;
6+
export default SuccessButton;

src/frontend/index.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
import React from 'react'
2-
import ReactDOM from 'react-dom'
3-
import App from './component/App'
4-
import { AppContainer } from 'react-hot-loader'
5-
import { overrideComponentTypeChecker } from 'react-toolbox'
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import App from './component/App';
4+
import { AppContainer } from 'react-hot-loader';
5+
import { overrideComponentTypeChecker } from 'react-toolbox';
66

7-
const rootEl = document.getElementById('app')
7+
const rootEl = document.getElementById('app');
88

99
const render = () => {
1010
ReactDOM.render(
1111
<AppContainer>
1212
<App />
1313
</AppContainer>,
1414
rootEl
15-
)
16-
}
15+
);
16+
};
1717

1818
if (process.env.NODE_ENV !== 'production') {
1919
overrideComponentTypeChecker((classType, reactElement) => (
2020
reactElement && (
21-
reactElement.type === classType ||
22-
reactElement.type.name === classType.displayName
21+
reactElement.type === classType
22+
|| reactElement.type.name === classType.displayName
2323
)
24-
))
24+
));
2525
if (module.hot) {
26-
module.hot.accept('./component/App', render)
26+
module.hot.accept('./component/App', render);
2727
}
2828
}
2929

30-
render()
30+
render();

0 commit comments

Comments
 (0)