Skip to content

Commit c2d1e29

Browse files
committed
tutorial 4 updates
1 parent 9cf8a9d commit c2d1e29

File tree

5 files changed

+27
-8
lines changed

5 files changed

+27
-8
lines changed

Diff for: tutorials/4-end/components/Notifier.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Snackbar from 'material-ui/Snackbar';
33

44
let openSnackbarFn;
55

6-
class Notifier extends React.PureComponent {
6+
class Notifier extends React.Component {
77
state = {
88
open: false,
99
message: '',

Diff for: tutorials/4-end/now.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"env": {
3+
"NODE_ENV": "production"
4+
},
5+
"alias": "notifier.builderbook.org",
6+
"scale": {
7+
"sfo1": {
8+
"min": 1,
9+
"max": 1
10+
}
11+
}
12+
}

Diff for: tutorials/4-end/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"dev": "next",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "eslint components pages lib server"
9+
"lint": "eslint components pages lib server",
10+
"now": "now && now alias"
1011
},
1112
"dependencies": {
1213
"babel-cli": "^6.26.0",

Diff for: tutorials/4-end/pages/index.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Button from 'material-ui/Button';
55
import Notifier, { openSnackbar } from '../components/Notifier';
66
import withLayout from '../lib/withLayout';
77

8-
class Notify extends React.Component {
8+
class Index extends React.Component {
99
showNotifier = (event) => {
1010
event.preventDefault();
1111

@@ -27,7 +27,10 @@ class Notify extends React.Component {
2727
<div style={{ padding: '10px 45px' }}>
2828
<Head>
2929
<title>Notifier component</title>
30-
<meta name="description" content="description for indexing bots" />
30+
<meta
31+
name="description"
32+
content="How to show informational messages using Material-UI in a React web app"
33+
/>
3134
</Head>
3235
<br />
3336
<Notifier />
@@ -59,4 +62,4 @@ class Notify extends React.Component {
5962
}
6063
}
6164

62-
export default withLayout(Notify);
65+
export default withLayout(Index);

Diff for: tutorials/4-start/pages/index.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ import TextField from 'material-ui/TextField';
44
import Button from 'material-ui/Button';
55
import withLayout from '../lib/withLayout';
66

7-
class Notify extends React.Component {
7+
class Index extends React.Component {
88
render() {
99
return (
1010
<div style={{ padding: '10px 45px' }}>
1111
<Head>
1212
<title>Notifier component</title>
13-
<meta name="description" content="description for indexing bots" />
13+
<meta
14+
name="description"
15+
content="How to show informational messages using Material-UI in a React web app"
16+
/>
1417
</Head>
1518
<form>
1619
<p> What is 2+2? </p>
@@ -37,4 +40,4 @@ class Notify extends React.Component {
3740
}
3841
}
3942

40-
export default withLayout(Notify);
43+
export default withLayout(Index);

0 commit comments

Comments
 (0)