Skip to content

Commit 092e728

Browse files
committed
Update: next@12
1 parent d969830 commit 092e728

22 files changed

Lines changed: 7048 additions & 10298 deletions

intersection/back/package-lock.json

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

intersection/back/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
"cookie-parser": "^1.4.5",
1616
"cors": "^2.8.5",
1717
"cross-env": "^7.0.2",
18-
"dotenv": "^8.2.0",
18+
"dotenv": "^16.0.0",
1919
"express": "^4.17.1",
2020
"express-session": "^1.17.1",
21-
"helmet": "^3.23.3",
21+
"helmet": "^5.0.2",
2222
"hpp": "^0.2.3",
2323
"morgan": "^1.10.0",
2424
"multer": "^1.4.2",
2525
"multer-s3": "^2.9.0",
2626
"mysql2": "^2.1.0",
27-
"passport": "^0.4.1",
27+
"passport": "^0.5.2",
2828
"passport-local": "^1.0.0",
29-
"pm2": "^4.4.0",
30-
"sequelize": "^5.21.13",
31-
"sequelize-cli": "^5.5.1"
29+
"pm2": "^5.2.0",
30+
"sequelize": "^6.19.0",
31+
"sequelize-cli": "^6.4.1"
3232
},
3333
"devDependencies": {
3434
"nodemon": "^2.0.4"

intersection/front/.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"parser": "babel-eslint",
2+
"parser": "@babel/eslint-parser",
33
"parserOptions": {
44
"ecmaVersion": 2020,
55
"sourceType": "module",
@@ -30,6 +30,7 @@
3030
"react/jsx-one-expression-per-line": "off",
3131
"object-curly-newline": "off",
3232
"linebreak-style": "off",
33-
"no-param-reassign": "off"
33+
"no-param-reassign": "off",
34+
"max-len": ["warn", { "code": 120 }]
3435
}
3536
}

intersection/front/components/AppLayout.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const SearchInput = styled(Input.Search)`
1414
vertical-align: middle;
1515
`;
1616

17-
const AppLayout = ({ children }) => {
17+
function AppLayout({ children }) {
1818
const [searchInput, onChangeSearchInput] = useInput('');
1919
const router = useRouter();
2020
const { me } = useSelector((state) => state.user);
@@ -25,22 +25,21 @@ const AppLayout = ({ children }) => {
2525

2626
return (
2727
<div>
28-
<Menu mode="horizontal" selectedKeys={[router.pathname]}>
29-
<Menu.Item key="/">
30-
<Link href="/"><a>노드버드</a></Link>
31-
</Menu.Item>
32-
<Menu.Item key="/profile">
33-
<Link href="/profile"><a>프로필</a></Link>
34-
</Menu.Item>
35-
<Menu.Item key="/search">
36-
<SearchInput
28+
<Menu
29+
mode="horizontal"
30+
selectedKeys={[router.pathname]}
31+
items={[
32+
{ label: <Link href="/"><a>노드버드</a></Link>, key: '/' },
33+
{ label: <Link href="/profile"><a>프로필</a></Link>, key: '/profile' },
34+
{ label: <SearchInput
3735
enterButton
3836
value={searchInput}
3937
onChange={onChangeSearchInput}
4038
onSearch={onSearch}
41-
/>
42-
</Menu.Item>
43-
</Menu>
39+
/>,
40+
key: '/search' },
41+
]}
42+
/>
4443
<Row gutter={8}>
4544
<Col xs={24} md={6}>
4645
{me ? <UserProfile /> : <LoginForm />}
@@ -54,7 +53,7 @@ const AppLayout = ({ children }) => {
5453
</Row>
5554
</div>
5655
);
57-
};
56+
}
5857

5958
AppLayout.propTypes = {
6059
children: PropTypes.node.isRequired,

intersection/front/components/CommentForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useSelector, useDispatch } from 'react-redux';
66
import useInput from '../hooks/useInput';
77
import { ADD_COMMENT_REQUEST } from '../reducers/post';
88

9-
const CommentForm = ({ post }) => {
9+
function CommentForm({ post }) {
1010
const dispatch = useDispatch();
1111
const id = useSelector((state) => state.user.me?.id);
1212
const { addCommentDone, addCommentLoading } = useSelector((state) => state.post);
@@ -39,7 +39,7 @@ const CommentForm = ({ post }) => {
3939
</Form.Item>
4040
</Form>
4141
);
42-
};
42+
}
4343

4444
CommentForm.propTypes = {
4545
post: PropTypes.object.isRequired,

intersection/front/components/FollowButton.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
44
import { useSelector, useDispatch } from 'react-redux';
55
import { FOLLOW_REQUEST, UNFOLLOW_REQUEST } from '../reducers/user';
66

7-
const FollowButton = ({ post }) => {
7+
function FollowButton({ post }) {
88
const dispatch = useDispatch();
99
const { me, followLoading, unfollowLoading } = useSelector((state) => state.user);
1010
const isFollowing = me?.Followings.find((v) => v.id === post.User.id);
@@ -30,7 +30,7 @@ const FollowButton = ({ post }) => {
3030
{isFollowing ? '언팔로우' : '팔로우'}
3131
</Button>
3232
);
33-
};
33+
}
3434

3535
FollowButton.propTypes = {
3636
post: PropTypes.object.isRequired,

intersection/front/components/FollowList.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useDispatch } from 'react-redux';
66

77
import { UNFOLLOW_REQUEST, REMOVE_FOLLOWER_REQUEST } from '../reducers/user';
88

9-
const FollowList = ({ header, data, onClickMore, loading }) => {
9+
function FollowList({ header, data, onClickMore, loading }) {
1010
const dispatch = useDispatch();
1111
const onCancel = (id) => () => {
1212
if (header === '팔로잉') {
@@ -43,11 +43,15 @@ const FollowList = ({ header, data, onClickMore, loading }) => {
4343
)}
4444
/>
4545
);
46+
}
47+
48+
FollowList.defaultProps = {
49+
data: [],
4650
};
4751

4852
FollowList.propTypes = {
4953
header: PropTypes.string.isRequired,
50-
data: PropTypes.array.isRequired,
54+
data: PropTypes.array,
5155
onClickMore: PropTypes.func.isRequired,
5256
loading: PropTypes.bool.isRequired,
5357
};

intersection/front/components/LoginForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const FormWrapper = styled(Form)`
1515
padding: 10px;
1616
`;
1717

18-
const LoginForm = () => {
18+
function LoginForm() {
1919
const dispatch = useDispatch();
2020
const { logInLoading, logInError } = useSelector((state) => state.user);
2121
const [email, onChangeEmail] = useInput('');
@@ -56,6 +56,6 @@ const LoginForm = () => {
5656
</ButtonWrapper>
5757
</FormWrapper>
5858
);
59-
};
59+
}
6060

6161
export default LoginForm;

intersection/front/components/NicknameEditForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useSelector, useDispatch } from 'react-redux';
55
import useInput from '../hooks/useInput';
66
import { CHANGE_NICKNAME_REQUEST } from '../reducers/user';
77

8-
const NicknameEditForm = () => {
8+
function NicknameEditForm() {
99
const { me } = useSelector((state) => state.user);
1010
const [nickname, onChangeNickname] = useInput(me?.nickname || '');
1111
const dispatch = useDispatch();
@@ -28,6 +28,6 @@ const NicknameEditForm = () => {
2828
/>
2929
</Form>
3030
);
31-
};
31+
}
3232

3333
export default NicknameEditForm;

intersection/front/components/PostCard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import FollowButton from './FollowButton';
2222

2323
moment.locale('ko');
2424

25-
const PostCard = ({ post }) => {
25+
function PostCard({ post }) {
2626
const dispatch = useDispatch();
2727
const { removePostLoading } = useSelector((state) => state.post);
2828
const [commentFormOpened, setCommentFormOpened] = useState(false);
@@ -178,7 +178,7 @@ const PostCard = ({ post }) => {
178178
)}
179179
</div>
180180
);
181-
};
181+
}
182182

183183
PostCard.propTypes = {
184184
post: PropTypes.shape({

0 commit comments

Comments
 (0)