Skip to content

Commit b48b899

Browse files
committed
Merge remote-tracking branch 'origin/master' into master
2 parents 8d27e85 + b14a376 commit b48b899

16 files changed

Lines changed: 2435 additions & 2212 deletions

File tree

ch5/back/models/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const DataTypes = require('sequelize');
22
const { Model } = DataTypes;
33

4-
module.exports = class Post extends Model {
4+
module.exports = class User extends Model {
55
static init(sequelize) {
66
return super.init({
77
// id가 기본적으로 들어있다.

ch5/front/components/PostForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ const PostForm = () => {
4646
type: UPLOAD_IMAGES_REQUEST,
4747
data: imageFormData,
4848
});
49-
});
49+
}, []);
5050

5151
const onRemoveImage = useCallback((index) => () => {
5252
dispatch({
5353
type: REMOVE_IMAGE,
5454
data: index,
5555
});
56-
});
56+
}, []);
5757

5858
return (
5959
<Form style={{ margin: '10px 0 20px' }} encType="multipart/form-data" onFinish={onSubmit}>

ch6/back/models/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const DataTypes = require('sequelize');
22
const { Model } = DataTypes;
33

4-
module.exports = class Post extends Model {
4+
module.exports = class User extends Model {
55
static init(sequelize) {
66
return super.init({
77
// id가 기본적으로 들어있다.

ch6/front/components/PostForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ const PostForm = () => {
4646
type: UPLOAD_IMAGES_REQUEST,
4747
data: imageFormData,
4848
});
49-
});
49+
}, []);
5050

5151
const onRemoveImage = useCallback((index) => () => {
5252
dispatch({
5353
type: REMOVE_IMAGE,
5454
data: index,
5555
});
56-
});
56+
}, []);
5757

5858
return (
5959
<Form style={{ margin: '10px 0 20px' }} encType="multipart/form-data" onFinish={onSubmit}>

ch6/front/pages/_document.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React from 'react';
2-
import Document, {
3-
Html, Head, Main, NextScript,
4-
} from 'next/document';
2+
import Document, { Html, Head, Main, NextScript } from 'next/document';
53
import { ServerStyleSheet } from 'styled-components';
64

75
export default class MyDocument extends Document {
@@ -11,7 +9,7 @@ export default class MyDocument extends Document {
119

1210
try {
1311
ctx.renderPage = () => originalRenderPage({
14-
enhanceApp: (App) => (props) => sheet.collectStyles(<App {...props} />),
12+
enhanceApp: App => props => sheet.collectStyles(<App {...props} />),
1513
});
1614

1715
const initialProps = await Document.getInitialProps(ctx);
@@ -35,7 +33,6 @@ export default class MyDocument extends Document {
3533
<Head />
3634
<body>
3735
<Main />
38-
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6,es7,es8,es9,NodeList.prototype.forEach&flags=gated" />
3936
<NextScript />
4037
</body>
4138
</Html>

ch7/back/models/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const DataTypes = require('sequelize');
22
const { Model } = DataTypes;
33

4-
module.exports = class Post extends Model {
4+
module.exports = class User extends Model {
55
static init(sequelize) {
66
return super.init({
77
// id가 기본적으로 들어있다.

ch7/back/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch7/front/.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"presets": ["next/babel"],
33
"plugins": [
4-
["babel-plugin-styled-components", {
4+
["styled-components", {
55
"ssr": true,
66
"displayName": true
77
}]

ch7/front/components/PostForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ const PostForm = () => {
4747
type: UPLOAD_IMAGES_REQUEST,
4848
data: imageFormData,
4949
});
50-
});
50+
}, []);
5151

5252
const onRemoveImage = useCallback((index) => () => {
5353
dispatch({
5454
type: REMOVE_IMAGE,
5555
data: index,
5656
});
57-
});
57+
}, []);
5858

5959
return (
6060
<Form style={{ margin: '10px 0 20px' }} encType="multipart/form-data" onFinish={onSubmit}>

0 commit comments

Comments
 (0)