Skip to content

Commit b72c835

Browse files
committed
fixes: style, drop console.logs
1 parent 9e774ce commit b72c835

File tree

7 files changed

+11
-18
lines changed

7 files changed

+11
-18
lines changed

lib/actions/routes.js

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function setRoute(route) {
77
if (route && route !== previous) {
88
switch (route) {
99
case 'tutorials':
10-
console.log('load');
1110
store_1.store.dispatch(Action.loadTutorials());
1211
}
1312
previous = route;

lib/components/app.js

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ var default_1 = (function (_super) {
2727
}
2828
default_1.prototype.render = function () {
2929
var state = this.props.state;
30-
console.log(state);
3130
return (React.createElement("section", {className: 'cr', key: 'main', style: { height: height }}, React.createElement(_components_1.Menu, {route: state.route, position: state.position}), React.createElement(_components_1.Routes, {state: state, ref: 'route'}), React.createElement(_components_1.Alert, {alert: state.alert})));
3231
};
3332
default_1 = __decorate([

lib/components/tutorials/tutorials.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ var TutorialList = (function (_super) {
4242
var _this = this;
4343
var _a = this.props, tutorials = _a.tutorials, loadTutorials = _a.loadTutorials, selectTutorial = _a.selectTutorial, toggleAlert = _a.toggleAlert, updateTutorial = _a.updateTutorial;
4444
return (React.createElement("div", {className: 'cr-tutorials'}, React.createElement(table_1.default, null, React.createElement(table_header_1.default, {displaySelectAll: false, adjustForCheckbox: false}, React.createElement(table_row_1.default, null, React.createElement(table_header_column_1.default, null, "Tutorial"), React.createElement(table_header_column_1.default, null, "Version"))), React.createElement(table_body_1.default, {displayRowCheckbox: false}, tutorials.map(function (tutorial, index) {
45-
return (React.createElement(table_row_1.default, null, React.createElement(table_row_column_1.default, null, React.createElement(flat_button_1.default, {label: _this.trim(tutorial.name), primary: true, onTouchTap: selectTutorial.bind(_this, tutorial)})), React.createElement(table_row_column_1.default, null, tutorial.version, " ", tutorial.latest
46-
? React.createElement(file_upload_1.default, {onClick: updateTutorial(tutorial.name)})
47-
: null), "/>"));
48-
}))), React.createElement("br", null), React.createElement(flat_button_1.default, {style: { margin: '0 auto' }, label: 'Check for Tutorials', secondary: true, onTouchTap: loadTutorials})));
45+
return (React.createElement(table_row_1.default, null, React.createElement(table_row_column_1.default, null, React.createElement(flat_button_1.default, {label: _this.trim(tutorial.name), primary: true, onTouchTap: selectTutorial.bind(_this, tutorial)})), !!tutorial.latest
46+
? React.createElement(table_row_column_1.default, null, tutorial.version, " ", React.createElement(file_upload_1.default, {onClick: updateTutorial(tutorial.name)}))
47+
: React.createElement(table_row_column_1.default, null, tutorial.version)));
48+
}))), React.createElement("br", null), React.createElement(flat_button_1.default, {style: { margin: '0 95px' }, label: 'Check for Tutorials', secondary: true, onTouchTap: loadTutorials})));
4949
};
5050
TutorialList = __decorate([
5151
react_redux_1.connect(null, function (dispatch) {

src/actions/routes.ts

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export function setRoute(route: string): CR.Action|void {
1111
// preloading for routes
1212
switch (route) {
1313
case 'tutorials':
14-
console.log('load');
1514
store.dispatch(Action.loadTutorials());
1615
}
1716

src/components/app.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ window.onresize = function() {
1515
export default class extends React.Component<{state?: CR.State}, {}> {
1616
render(): React.ReactElement<{}> {
1717
const state = this.props.state;
18-
console.log(state);
1918
return (
2019
<section className='cr' key='main' style={{height}}>
2120
<Menu route={state.route} position={state.position} />
-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
.cr-tutorials {
22
padding: 10px;
3-
&-check {
4-
margin: 0 auto;
5-
}
63
}

src/components/tutorials/tutorials.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import FileUpload from 'material-ui/lib/svg-icons/file/file-upload';
1010
import {MarkdownText} from '../_components';
1111
import {connect} from 'react-redux';
1212
import * as Action from '../../actions/actions';
13+
import {pink500} from 'material-ui/lib/styles/colors';
1314

1415
@connect(null, (dispatch) => {
1516
return {
@@ -63,12 +64,11 @@ class TutorialList extends React.Component<{
6364
<TableRowColumn>
6465
<FlatButton label={this.trim(tutorial.name)} primary={true} onTouchTap={selectTutorial.bind(this, tutorial)} />
6566
</TableRowColumn>
66-
<TableRowColumn>
67-
{tutorial.version} {tutorial.latest
68-
? <FileUpload onClick={updateTutorial(tutorial.name)} />
69-
: null}
70-
</TableRowColumn>
71-
/>
67+
{!!tutorial.latest
68+
? <TableRowColumn>
69+
{tutorial.version} <FileUpload onClick={updateTutorial(tutorial.name)} />
70+
</TableRowColumn>
71+
: <TableRowColumn>{tutorial.version}</TableRowColumn>}
7272
</TableRow>
7373
);
7474
})
@@ -77,7 +77,7 @@ class TutorialList extends React.Component<{
7777
</Table>
7878

7979
<br />
80-
<FlatButton style={{margin: '0 auto'}} label='Check for Tutorials' secondary={true} onTouchTap={loadTutorials} />
80+
<FlatButton style={{margin: '0 95px'}} label='Check for Tutorials' secondary={true} onTouchTap={loadTutorials} />
8181
</div>
8282
);
8383
}

0 commit comments

Comments
 (0)