Skip to content

Commit 36ad8ff

Browse files
committed
upgrade to Next v9
1 parent fcb5c88 commit 36ad8ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+27030
-13280
lines changed

book/1-begin/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"dependencies": {
1111
"@material-ui/core": "4.1.3",
1212
"@material-ui/styles": "4.1.2",
13-
"next": "8.1.0",
13+
"next": "9.1.1",
1414
"prop-types": "15.7.2",
15-
"react": "16.8.6",
16-
"react-dom": "16.8.6"
15+
"react": "16.10.2",
16+
"react-dom": "16.10.2"
1717
},
1818
"devDependencies": {}
1919
}

book/1-begin/yarn.lock

Lines changed: 1751 additions & 814 deletions
Large diffs are not rendered by default.

book/1-end/components/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Header = () => (
1010
<Toolbar style={styleToolbar}>
1111
<Grid container direction="row" justify="space-around" align="center">
1212
<Grid item xs={12} style={{ textAlign: 'right' }}>
13-
<Link prefetch href="/login">
13+
<Link href="/login">
1414
<a style={{ margin: '0px 20px 0px auto' }}>Log in</a>
1515
</Link>
1616
</Grid>

book/1-end/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"dependencies": {
1212
"@material-ui/core": "4.1.3",
1313
"@material-ui/styles": "4.1.2",
14-
"next": "8.1.0",
14+
"next": "9.1.1",
1515
"prop-types": "15.7.2",
16-
"react": "16.8.6",
17-
"react-dom": "16.8.6"
16+
"react": "16.10.2",
17+
"react-dom": "16.10.2"
1818
},
1919
"devDependencies": {
2020
"babel-eslint": "10.0.2",

book/1-end/pages/_app.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import CssBaseline from '@material-ui/core/CssBaseline';
22
import { ThemeProvider } from '@material-ui/styles';
3-
import App, { Container } from 'next/app';
3+
import App from 'next/app';
44
import React from 'react';
55

66
import { theme } from '../lib/theme';
@@ -34,16 +34,13 @@ class MyApp extends App {
3434
// console.log(pageProps);
3535

3636
return (
37-
<Container>
38-
{/* ThemeProvider makes the theme available down the React
39-
tree thanks to React context. */}
40-
<ThemeProvider theme={theme}>
41-
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
42-
<CssBaseline />
43-
<Header {...pageProps} />
44-
<Component {...pageProps} />
45-
</ThemeProvider>
46-
</Container>
37+
<ThemeProvider theme={theme}>
38+
{/* ThemeProvider makes the theme available down the React tree thanks to React context. */}
39+
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
40+
<CssBaseline />
41+
<Header {...pageProps} />
42+
<Component {...pageProps} />
43+
</ThemeProvider>
4744
);
4845
}
4946
}

book/1-end/yarn.lock

Lines changed: 1690 additions & 742 deletions
Large diffs are not rendered by default.

book/2-begin/components/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Header = () => (
1010
<Toolbar style={styleToolbar}>
1111
<Grid container direction="row" justify="space-around" align="center">
1212
<Grid item xs={12} style={{ textAlign: 'right' }}>
13-
<Link prefetch href="/login">
13+
<Link href="/login">
1414
<a style={{ margin: '0px 20px 0px auto' }}>Log in</a>
1515
</Link>
1616
</Grid>

book/2-begin/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"express": "4.17.1",
1717
"express-session": "1.16.2",
1818
"mongoose": "5.6.1",
19-
"next": "8.1.0",
19+
"next": "9.1.1",
2020
"prop-types": "15.7.2",
21-
"react": "16.8.6",
22-
"react-dom": "16.8.6"
21+
"react": "16.10.2",
22+
"react-dom": "16.10.2"
2323
},
2424
"devDependencies": {
2525
"babel-eslint": "10.0.2",

book/2-begin/pages/_app.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import CssBaseline from '@material-ui/core/CssBaseline';
22
import { ThemeProvider } from '@material-ui/styles';
3-
import App, { Container } from 'next/app';
3+
import App from 'next/app';
44
import React from 'react';
55

66
import { theme } from '../lib/theme';
@@ -34,16 +34,13 @@ class MyApp extends App {
3434
// console.log(pageProps);
3535

3636
return (
37-
<Container>
38-
{/* ThemeProvider makes the theme available down the React
39-
tree thanks to React context. */}
40-
<ThemeProvider theme={theme}>
41-
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
42-
<CssBaseline />
43-
<Header {...pageProps} />
44-
<Component {...pageProps} />
45-
</ThemeProvider>
46-
</Container>
37+
<ThemeProvider theme={theme}>
38+
{/* ThemeProvider makes the theme available down the React tree thanks to React context. */}
39+
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
40+
<CssBaseline />
41+
<Header {...pageProps} />
42+
<Component {...pageProps} />
43+
</ThemeProvider>
4744
);
4845
}
4946
}

0 commit comments

Comments
 (0)