code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -61,7 +61,10 @@ class Nav extends React.Component {
</a>
<a href="/">
<div className="profile-image">
- <img src="images/profile/me.jpeg" alt="me" />
+ <img
+ src="/images/hyunchanpark//images/user-icon.jpg"
+ al... | JavaScript | a๋งํฌ ์ฌ์ฉํ์ ๊ฒ ๋ง์ด ๋ณด์
๋๋ค!
a ๋งํฌ๋์ Link๋ฅผ ์ฌ์ฉํ๋๊ฒ ์ข์๋ณด์
๋๋ค! |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ์ ๊ท์ ํํ์ ์ฌ์ฉํด์ ์ด๋ฐ์์ผ๋ก ํ
์คํธ ๋๋ฆด ์ ์๊ตฐ์ ์ฐธ๊ณ ํ๊ฒ ์ต๋๋ค !! ๐ |
@@ -0,0 +1,92 @@
+[
+ {
+ "id": 1,
+ "userName": "wecode",
+ "city": "KAYTRANADA",
+ "userImgSrc": "/images/hyunchanpark/images/insta-mini.jpg",
+ "feedImgSrc": "https://images.unsplash.com/photo-1621419079793-73020baef9eb?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw0fHx8ZW58MHx8fHw%3D&ixlib=rb-1.2.1&auto=f... | Unknown | json ๋ฐ์ดํฐ๋ฅผ ๋ค์ํ๊ฒ ํ์ฉํ์
์ ๋ณด๊ธฐ ์ข์ต๋๋ค! |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ๋น๊ตฌ์กฐํ ํ ๋น์ ๋ฐ๋ก ํด์ฃผ์
จ๋๋ฐ ์ฌ์ฉ์ ์ํ๊ณ ๊ณ์ญ๋๋ค!
ํจ์๋ ๋น๊ตฌ์กฐํ ํ ๋น ๊ฐ๋ฅํด๋ณด์
๋๋ค ! |
@@ -0,0 +1,43 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+
+class Comment extends React.Component {
+ render() {
+ const { feedId, comment, onRemoveComment, onToggleLike } = this.props;
+
+ return (
+ <>
+ <div className="comment" id={comment.id}>
+ <div classNa... | JavaScript | ๋น๊ตฌ์กฐํ ํ ๋น ๋ณด๊ธฐ ์ข์ต๋๋ค ๐ |
@@ -0,0 +1,47 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+import Comment from './Comment';
+
+class CommentList extends Component {
+ render() {
+ const { feedId, commentList, onToggleLike, onRemoveComment } = this.props;
+
+ return (
+ <>
+ <div>
+ ... | JavaScript | ์ฌ์ฉ์ ์ํ์๋ ์ฝ๋๋ฉด ์ญ์ ๋ฅผ ํด์ฃผ์๋๊ฒ ์ข์ ๋ณด์
๋๋ค! |
@@ -0,0 +1,47 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+import Comment from './Comment';
+
+class CommentList extends Component {
+ render() {
+ const { feedId, commentList, onToggleLike, onRemoveComment } = this.props;
+
+ return (
+ <>
+ <div>
+ ... | JavaScript | ์ข์์ ๊น์ง ๊ตฌํํ์ ๊ฑด๊ฐ์ ๐ฅ |
@@ -0,0 +1,47 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+import Comment from './Comment';
+
+class CommentList extends Component {
+ render() {
+ const { feedId, commentList, onToggleLike, onRemoveComment } = this.props;
+
+ return (
+ <>
+ <div>
+ ... | JavaScript | json๋ฐ์ดํฐ๋ฅผ ๋ณต์ฌํด์ ์ด๋ ๊ฒ ์ฌ์ฉ๋ ๊ฐ๋ฅํ๊ตฐ์ ์ฐธ๊ณ ํ๊ฒ ์ต๋๋ค~ |
@@ -0,0 +1,47 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+import Comment from './Comment';
+
+class CommentList extends Component {
+ render() {
+ const { feedId, commentList, onToggleLike, onRemoveComment } = this.props;
+
+ return (
+ <>
+ <div>
+ ... | JavaScript | key๋ฐ๋ก id๋ฐ๋ก ๋ฐ์ดํฐ๋ฅผ ์ ๋ฌํด์ฃผ์ ๊ฑฐ ๋๋ฌด ์ข์๊ฑฐ ๊ฐ๋ค์! ๐๐ป |
@@ -0,0 +1,150 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+import CommentInput from './CommentInput';
+import CommentList from './CommentList';
+
+class Feed extends Component {
+ render() {
+ const { feed, onSubmitCommentForm, onRemoveComment, onToggleLike } =
+ th... | JavaScript | ์ฌ์ฉํ์ง ์๋ console.log ๋ฐ๊ฒฌ~ ๐ธ |
@@ -0,0 +1,156 @@
+@import '../Styles/common.scss';
+
+.entire-container {
+ @include flex-set(row, center, center);
+ width: 100%;
+ height: 100vh;
+ background-color: $background-default-color;
+
+ .entire {
+ width: 350px;
+ background-color: $background-default-color;
+
+ .entire_top {
+ height: ... | Unknown | sass nesting ์ฌ์ฉ ๊น๋, ๊ฐ๊ฒฐ ๊ฐ๋
์ฑ ๐ |
@@ -0,0 +1,150 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+import CommentInput from './CommentInput';
+import CommentList from './CommentList';
+
+class Feed extends Component {
+ render() {
+ const { feed, onSubmitCommentForm, onRemoveComment, onToggleLike } =
+ th... | JavaScript | Boolean ๋ฐ์ดํฐ ํ์
์ ํ์ฉ์ ํ๋ํ๋ ๊ผผ๊ผผํ๊ฒ ์์ฃผ ํ์ ์ ๐๐ป ๋ฐ์~~~ |
@@ -0,0 +1,212 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import Nav from '../../../Components/Nav/Nav';
+import FeedList from './FeedList';
+import './Main.scss';
+
+class Main extends React.Component {
+ render() {
+ return (
+ <>
+ <Nav />
+ <div className="main-... | JavaScript | ๋ฆฌ์กํธ ์ธ๋ผ์ธ ์คํ์ผ๋ก ๊พธ๋ฏธ๋๋ฒ ๊น๋จน๊ณ ์์๋๋ฐ ์ฐธ๊ณ ํ๊ฒ ์ต๋๋ค~ |
@@ -0,0 +1,212 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import Nav from '../../../Components/Nav/Nav';
+import FeedList from './FeedList';
+import './Main.scss';
+
+class Main extends React.Component {
+ render() {
+ return (
+ <>
+ <Nav />
+ <div className="main-... | JavaScript | ์๊ธฐ ์ฝ๋๋ ์ ์ฒด๋ก a๋งํฌ๋ฅผ ์ฃผ์
จ์ต๋๋ค Link๋ก ์ฃผ์๋ฉด ์ข์๊ฑฐ ๊ฐ์ต๋๋ค |
@@ -0,0 +1,47 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+import Comment from './Comment';
+
+class CommentList extends Component {
+ render() {
+ const { feedId, commentList, onToggleLike, onRemoveComment } = this.props;
+
+ return (
+ <>
+ <div>
+ ... | JavaScript | formํ๊ทธ์ submit์ ์ถ๊ฐํ์
์ ์ํฐํค๋ฅผ ์ณ๋ ์
๋ ฅ์ด ๊ฐ๋ฅํ๊ฒ ํ์ ๋ณด๊ธฐ ์ข์ต๋๋ค!
์ด๋ ๊ฒ ํ๋ฉด ๋ฐ๋ก ์ํฐํค ํจ์๋ฅผ ๋ง๋ค์ง ์์๋ ๋๋๊น ์ข์๊ฑฐ ๊ฐ์ต๋๋ค ! |
@@ -0,0 +1,47 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+import Comment from './Comment';
+
+class CommentList extends Component {
+ render() {
+ const { feedId, commentList, onToggleLike, onRemoveComment } = this.props;
+
+ return (
+ <>
+ <div>
+ ... | JavaScript | ์๋์......์ญ์ ๊น์ง ๊ตฌํํ์ต๋๋ค. ใ
ใ
|
@@ -61,7 +61,10 @@ class Nav extends React.Component {
</a>
<a href="/">
<div className="profile-image">
- <img src="images/profile/me.jpeg" alt="me" />
+ <img
+ src="/images/hyunchanpark//images/user-icon.jpg"
+ al... | JavaScript | [์ฐธ๊ณ ](https://stackoverflow.com/questions/43087007/react-link-vs-a-tag-and-arrow-function)
`<a>`๋ ์ฌ์ฉํ๋ฉด ์๋ก๊ณ ์นจ ํ๋ ๊ฒ์ฒ๋ผ html์ ์๋ก ๋ค ๋ฐ์ ์ค๋ ๋ฐ๋ฉด, `<Link>`๋ฅผ ์ฌ์ฉํ๋ฉด ์ปดํฌ๋ํธ๋ง ๋ฐ๊ฟ์ค๋๋ค. ๋ ๋๋ง ์ต์ ํ๋ฅผ ์ํด์ `<Link>` ์ฌ์ฉํด์ฃผ์ธ์! |
@@ -22,6 +22,7 @@ nav {
.title {
margin: 0;
font-size: 30px;
+ font-weight: 400;
font-family: 'Lobster', cursive;
}
@@ -44,5 +45,30 @@ nav {
font-weight: 300;
}
}
+
+ .path-icon {
+ display: flex;
+
+ a {
+ margin-left: 24px;
+ backgr... | Unknown | font-weight:400์ด ๊ธฐ๋ณธ์์ฑ์ธ๋ฐ ๋ฐ๋ก ๋ถ์ฌํ์ ์ด์ ๊ฐ ์๋์? |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ์ด ๊ฐ์ ์ปดํฌ๋ํธ๋ด๋ถ์ ๊ฐ์ผ๋ก ๊ฐ์ง๊ณ ์๋๊ฒ ์ข์๋ณด์ด๋๋ฐ ์ปดํฌ๋ํธ ๋ฐ๊นฅ์์ ์ ์ธํ์ ์ด์ ๊ฐ ์๋์? |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ```suggestion
return reg.test(value)
```
test method์ return๊ฐ ์์ฒด๊ฐ boolean์ด๊ธฐ ๋๋ฌธ์ ์์ ๊ฐ์ด ๊ฐ๊ฒฐํ๊ฒ ํํ ๊ฐ๋ฅํด๋ณด์
๋๋ค! |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ๊ธฐ๋ฅ๋ณ ํจ์ ๋ถ๋ฆฌํ๊ณ ์ ์ฌํ์ฉํ์ ๊ฒ ๊ฐ์ต๋๋ค!๐ |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | validateInputData ๋ฅผ ํธ์ถํ๊ณ ๊ณ์์ง๋ง ์ด ํจ์๋ ์คํ๋๊ธฐ๋ง ํ๊ณ ๋ฆฌํด๊ฐ์ ์ด๋์๋ ํ์ฉํ์ง ์๊ณ ์๋ ๊ฒ ๊ฐ์ต๋๋ค!
์ค์ง์ ์ผ๋ก ์ด๋ค ์๋ฏธ๋ ์๋ ์ฝ๋๊ฐ์ต๋๋ค! |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | `const {name, value} = e.target;` ์ผ๋ก ๊ตฌ์กฐ๋ถํดํด์ ์ฌ์ฉํ์๋ฉด ์ข ๋ ๊ฐ๊ฒฐํ๊ฒ ๋ค์! |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ๐
state๊ฐ๋ ๊ตฌ์กฐ๋ถํดํด์ ์ฌ์ฉํ๋ฉด ์ข ๋ ๊ฐ๊ฒฐํด๋ณด์ผ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ๊ฑด์ฐ๋์ด ๋ฆฌ๋ทฐ ์ ๋จ๊ฒจ์ฃผ์
จ๋ค์ ํ์ธํ๊ณ ๋ฐ์ํด๋ณด์ธ์!๐ |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ์ ์ด์ boolean์ ๋ฆฌํดํ๋ ํจ์์ด๊ธฐ ๋๋ฌธ์ not ์ฐ์ฐ์๋ฅผ ํ์ฉํด์
```suggestion
const isDisabled = !this.validateInputData(userId, userPw)
```
button tag์์ ํ๋ฒ๋ง ์ฌ์ฉ๋๋ ๊ฐ์ด๋ผ๋ฉด ๋ฐ๋ก ๋ณ์์ ์ธ ํ ๋น๊ณผ์ ๊ฑฐ์น ํ์ ์์ด ๋ฒํผ ํ๊ทธ ๋ด์ ๋ฐ๋ก ์ ์ด์ค๋ ๋ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,121 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { withRouter } from 'react-router';
+import './Login.scss';
+
+const REGEXP = {
+ emailRegExp:
+ /[a-zA-Z0-9.-_+!]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,}(?:.[a-zA-Z0-9]{2,3})?/,
+ passwordRegExp: /[a-zA-Z0-9]{5,100}/,
+};
+
+cl... | JavaScript | ```suggestion
disabled={!this.validateInputData(userId, userPw)}
```
์์ ๋ฌ์๋๋ฆฐ ์ฝ๋ฉํธ์ ์ด์ด์ง๋ ๋ด์ฉ์
๋๋ค! |
@@ -0,0 +1,156 @@
+@import '../Styles/common.scss';
+
+.entire-container {
+ @include flex-set(row, center, center);
+ width: 100%;
+ height: 100vh;
+ background-color: $background-default-color;
+
+ .entire {
+ width: 350px;
+ background-color: $background-default-color;
+
+ .entire_top {
+ height: ... | Unknown | ์ปดํฌ๋ํธ ์ด๋ฆ์ผ๋ก nesting ์ ์ฉํด์ฃผ์ธ์!
์ด๋ ๊ฒ ๋๋ฉด ๋ค๋ฅธ ์ปดํฌ๋ํธ๋ค์ ์คํ์ผ์๋ ์ํฅ์ ๋ฏธ์น ์ ์์ต๋๋ค! |
@@ -0,0 +1,156 @@
+@import '../Styles/common.scss';
+
+.entire-container {
+ @include flex-set(row, center, center);
+ width: 100%;
+ height: 100vh;
+ background-color: $background-default-color;
+
+ .entire {
+ width: 350px;
+ background-color: $background-default-color;
+
+ .entire_top {
+ height: ... | Unknown | ๊ณตํต์ ์ผ๋ก ์ ์ฉ๋์ด์ผ ํ๋ ์์ฑ์ด๋ผ๋ฉด common์ ๋ฃ์ด์ฃผ์๋ ๊ฒ ๋ง์ต๋๋ค! |
@@ -0,0 +1,156 @@
+@import '../Styles/common.scss';
+
+.entire-container {
+ @include flex-set(row, center, center);
+ width: 100%;
+ height: 100vh;
+ background-color: $background-default-color;
+
+ .entire {
+ width: 350px;
+ background-color: $background-default-color;
+
+ .entire_top {
+ height: ... | Unknown | mixin ์ ํ์ฉํด์ฃผ์
จ๋ค์! |
@@ -0,0 +1,12 @@
+package develop.baminchan;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class SidedishApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SidedishApplication... | Java | Security ์ค์ ์ด ๋ณ๋ ํด๋์ค๋ก ๋
๋ฆฝํ๋ฉด ์กฐ๊ธ ๋ ์ข์ ๊ฒ ๊ฐ๋ค์. |
@@ -0,0 +1,75 @@
+package develop.baminchan.controller;
+
+import develop.baminchan.dto.BanchanDto;
+import develop.baminchan.dto.CategoryDto;
+import develop.baminchan.dto.banchan.BanchanDetailDto;
+import develop.baminchan.entity.Banchan;
+import develop.baminchan.service.BanchanService;
+import org.springframework.h... | Java | `@PathVariable` ์์ path variable name์ ์ค์ ํ ์ ์๋ ํ๋๊ฐ ์์ ๊ฑฐ๋ผ ์๊ฐํฉ๋๋ค.
์ด๋ ํ ์๊ฐ์๋ ์๋ฐ์ ๊ธฐ๋ณธ์ ์ฝ๋ฉ ์ปจ๋ฒค์
์ ๊ณ์ ์ค์ํด์ฃผ์ธ์. |
@@ -0,0 +1,24 @@
+package develop.baminchan.controller;
+
+public class Message {
+ public static final int OK = 200;
+ public static final int BAD_REQUEST = 400;
+ public static final int NOT_FOUND = 404;
+ public static final int INTERNAL_SERVER_ERROR = 500;
+
+ private int statusCode;
+ private Obj... | Java | `enum` ์ผ๋ก ๊ด๋ฆฌํด๋ณด์๋ฉด ์ด๋จ๊น์? |
@@ -0,0 +1,78 @@
+package develop.baminchan.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import develop.baminchan.entity.Banchan;
+
+import java.util.Set;
+
+import static develop.baminchan.dto.util.StringConvertor.convertToSet;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class BanchanDto {
+... | Java | `@JsonProperty` ๋ฅผ ํตํด JSON field์ ์ด๋ฆ ์ ํด์ฃผ์๋ฉด ๋ ๊ฒ ๊ฐ์์.
์ธ๋์ค์ฝ์ด๋ ์๋ฐ ์ฝ๋์ ์์์ผ๋ฉด ํฉ๋๋ค. |
@@ -0,0 +1,78 @@
+package develop.baminchan.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import develop.baminchan.entity.Banchan;
+
+import java.util.Set;
+
+import static develop.baminchan.dto.util.StringConvertor.convertToSet;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class BanchanDto {
+... | Java | `private` ์ผ๋ก ๊ฐ๋ ค๋จ์ผ๋ฏ๋ก ๋ชจ๋ ํ๋์ ํด๋นํ๋ ํ๋ผ๋ฉํฐ๋ฅผ ๋ค ์ ์ธํด์ฃผ์
๋ ๋ฉ๋๋ค.
๋ ๊ทธ๋ ๊ฒ ํด์ผ ์ถํ ํ์ฅ์ฑ ์ธก๋ฉด์์๋ ์ข์ ๊ฑฐ๋ผ ์๊ฐํฉ๋๋ค.
`Banchan` ์ ๋ฐ์์ ํ๋์ฉ ์ ๋ณด๋ฅผ ๊บผ๋ด๋ ์ฑ
์์ `.of()` ์๊ฒ ๋งก๊ธฐ๊ณ ์์ฑ์์์ ๋จ์ ๊ฐ ํ ๋น์ ์ง์คํ๋ฉด ์ด๋จ๊น์. |
@@ -0,0 +1,45 @@
+package develop.baminchan.dto;
+
+import develop.baminchan.entity.Category;
+import org.springframework.data.annotation.Id;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CategoryDto {
+ @Id
+ private int id;
+
+ private String category_id;
+ private String name;
+
... | Java | DTO์ธ๋ฐ `@Id`.... ๊ด์ฐฎ์๊น์? |
@@ -0,0 +1,20 @@
+package develop.baminchan.dto.util;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+public class StringConvertor {
+ private StringConvertor() {
+ }
+
+ public static Set<String> convertToSet(String column) {
+ if (column == null) {
+ return ... | Java | [์ด ๋งํฌ](https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#jdbc.custom-converters) ๋ฅผ ์ฐธ๊ณ ํด์ฃผ์๊ณ ํ์ค ์คํ์ ๋ง๋ ํด๋์ค๋ก ์ ํ์ ๋ถํ๋๋ฆด๊ฒ์. |
@@ -0,0 +1,35 @@
+package develop.baminchan.entity;
+
+import org.springframework.data.annotation.Id;
+
+public class Order {
+ @Id
+ private Long id;
+
+ private String client_id;
+ private String detail_hash;
+ private int quantity;
+
+ public Order(Long id, String client_id, String detail_hash, int... | Java | ๊ตณ์ด ์ฝ์ด๋ฅผ ์ฌ์ฉํ์ค ํ์๋ ์์ด ๋ณด์ด๊ธฐ๋ ํฉ๋๋ค.
ํ
์ด๋ธ ์์๋ ์ด ์ด๋ฆ์ผ๋ก ์นผ๋ผ์ด ๋ค์ด๊ฐ์๋์? ๊ทธ๋ ๋ค๋ฉด ํ ๋ค์์ธ `quantity` ๋ก์ ์ ํ์ ์ ์๋๋ฆฝ๋๋ค. |
@@ -0,0 +1,57 @@
+package develop.baminchan.service;
+
+import develop.baminchan.dto.BanchanDto;
+import develop.baminchan.dto.CategoryDto;
+import develop.baminchan.entity.Banchan;
+import develop.baminchan.entity.Category;
+import develop.baminchan.repository.BanchanRepository;
+import develop.baminchan.repository.Ca... | Java | `logger` ์ฌ์ฉํด์ฃผ์ธ์. |
@@ -0,0 +1,57 @@
+package develop.baminchan.service;
+
+import develop.baminchan.dto.BanchanDto;
+import develop.baminchan.dto.CategoryDto;
+import develop.baminchan.entity.Banchan;
+import develop.baminchan.entity.Category;
+import develop.baminchan.repository.BanchanRepository;
+import develop.baminchan.repository.Ca... | Java | `.stream().map()` ์ฌ์ฉ์ผ๋ก ์์ for loop์ด๋ ์ฌ๊ธฐ๊น์ง ์์จ ์ ์์ด ๋ณด์
๋๋ค. |
@@ -0,0 +1,57 @@
+package develop.baminchan.service;
+
+import develop.baminchan.dto.BanchanDto;
+import develop.baminchan.dto.CategoryDto;
+import develop.baminchan.entity.Banchan;
+import develop.baminchan.entity.Category;
+import develop.baminchan.repository.BanchanRepository;
+import develop.baminchan.repository.Ca... | Java | ์ฌ๊ธฐ๋ `.stream().map()` ์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,20 @@
+package develop.baminchan.dto.util;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+public class StringConvertor {
+ private StringConvertor() {
+ }
+
+ public static Set<String> convertToSet(String column) {
+ if (column == null) {
+ return ... | Java | ๋ฐ์ดํฐ ๋ณํ์ ์ํ ์ปจ๋ฒํฐ์ ๋ํ ํ์ค ์คํ์ด ์์๊ตฐ์..์คํ๋ง ๋ฌธ์ ์ ์ฒด์ ์ผ๋ก ๊ผญ ํ๋ฒ ์ฝ์ด๋ด์ผ๊ฒ ๋ค์.
๊ฐ์ฌํฉ๋๋ค. |
@@ -0,0 +1,94 @@
+package develop.baminchan.entity;
+
+import develop.baminchan.entity.banchan.BanchanDetail;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.relational.core.mapping.Embedded;
+
+public class Banchan {
+ @Id
+ private Long id;
+
+ private String detail_hash;
+ ... | Java | ๋ค๋ฅธ ๋ฆฌ๋ทฐ์์ ์ด๋ฐ ๋ฅ์ ์์ฑ์๋ฅผ ๊ต์ฅํ ์ซ์ดํ์ ๋ค๊ณ ํ์๋๋ฐ ์ฌ๊ธฐ๋ ๋๊ฐ์ ๋ถ๋ถ ๋ง๋์? |
@@ -0,0 +1,80 @@
+import React from 'react';
+import Comment from './Comment';
+import './CommentList.scss';
+
+class CommentList extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ commentInput: '',
+ newComment: [],
+ nickname: '',
+ commentList: [],
+ c... | JavaScript | ๋น๊ตฌ์กฐํ ํ ๋น์ ์ ์ฉํ๋ฉด ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,23 @@
+import React from 'react';
+import './Comment.scss';
+
+class NewComment extends React.Component {
+ render() {
+ // const newArray = this.props.newComment.map((commentarray, index) => (
+ // <li key={index}>
+ // <span className="newCommentid">{this.props.nickname}</span>
+ // ... | JavaScript | - state ๋ฅผ ์ฌ์ฉํ์ง ์๋๋ค๋ฉด, constructor ์ ์ ์ธ์ด ํ์ ์์ต๋๋ค! |
@@ -0,0 +1,15 @@
+.comment {
+ .newComment {
+ margin-bottom: 5px;
+ }
+
+ .newCommentid {
+ font-weight: bold;
+ margin-bottom: 0;
+ }
+
+ .newComments {
+ font-weight: normal;
+ margin-left: 5px;
+ }
+} | Unknown | - `.comment` ์๋๋ก ๋ค์คํ
ํด์ฃผ์ธ์! |
@@ -0,0 +1,80 @@
+import React from 'react';
+import Comment from './Comment';
+import './CommentList.scss';
+
+class CommentList extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ commentInput: '',
+ newComment: [],
+ nickname: '',
+ commentList: [],
+ c... | JavaScript | - ๊ตฌ์กฐ ๋ถํด ํ ๋น ํด์ฃผ์ธ์!
```suggestion
inputToComment = () => {
const { comment, commentInput } = this.state;
this.setState({
id: 'wecode_bootcamp',
comment: comment.concat(commentInput),
});
};
``` |
@@ -0,0 +1,23 @@
+import React from 'react';
+import './Comment.scss';
+
+class NewComment extends React.Component {
+ render() {
+ // const newArray = this.props.newComment.map((commentarray, index) => (
+ // <li key={index}>
+ // <span className="newCommentid">{this.props.nickname}</span>
+ // ... | JavaScript | - ์ปดํฌ๋ํธ์ ๋์ผํ๊ฒ ํด๋์ค๋ค์ ์ง์ด์ฃผ์๊ณ , ์ฒซ๊ธ์๋ฅผ ๋๋ฌธ์๋ก ์์ฑํ๋ ์ปจ๋ฒค์
์ ์ปดํฌ๋ํธ๋ฅผ ๋ค์ด๋ฐ ํ๊ธฐ ์ํ ์ปจ๋ฒค์
์
๋๋ค!
```suggestion
<div className="comment">
``` |
@@ -0,0 +1,80 @@
+import React from 'react';
+import Comment from './Comment';
+import './CommentList.scss';
+
+class CommentList extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ commentInput: '',
+ newComment: [],
+ nickname: '',
+ commentList: [],
+ c... | JavaScript | - id ๋ผ๋ ๊ฐ์ ๋ฌด์จ ์ฉ๋๋ฅผ ์ํด ์์ฑํด ์ฃผ์ ๊ฑธ๊น์? id ๋ ๊ผญ ํ์ํ ๋ถ๋ถ์ด ์๋๋ผ๋ฉด ์ฌ์ฉ์ ์ง์ํด์ฃผ์ธ์! id ๊ฐ์ ํ๋ก์ ํธ ๋ด์์ ์ ์ผํด์ผ ํฉ๋๋ค.
- id ๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ๋ ์๋ฅผ ๋ค์ด, google map api ๋ฅผ ์ฌ์ฉํด์ ์ง๋๋ฅผ ๊ทธ๋ฆด๋, ์ง๋๋ฅผ ๊ทธ๋ฆด html element ๋ฅผ ํน์ ํ ๋ ์ฌ์ฉ๋๊ณค ํฉ๋๋ค. |
@@ -0,0 +1,80 @@
+import React from 'react';
+import Comment from './Comment';
+import './CommentList.scss';
+
+class CommentList extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ commentInput: '',
+ newComment: [],
+ nickname: '',
+ commentList: [],
+ c... | JavaScript | - ์ฌ๊ธฐ๋ id ๋ฅผ ์ฌ์ฉํ์ง ์๋๋ฐ ๋ถํ์ํ๊ฒ ์ฌ์ฉํ๋ ๊ฒ ๊ฐ์ต๋๋ค! ์ง์์ฃผ์ธ์~ |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | - constructor ์ ์ธ์ ๊ฐ์ฅ ์์ ์์น์์ผ์ฃผ์ธ์! |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | - defaultColor ์ disabled ๋ state ๋ก ๊ด๋ฆฌํ๊ธฐ์๋ ๋ถ์ ์ ํ ๊ฐ ๊ฐ์ต๋๋ค. idInput ๊ณผ pwInput ๋ฅผ ์ฌ์ฉํด์ ๊ณ์ฐํ ์ ์๋ ๊ฐ์ด๊ธฐ ๋๋ฌธ์
๋๋ค!
- ์ด๋ค ๊ธฐ์ค์ผ๋ก state ๋ฅผ ๋ง๋ค์ด์ผ ํ๋์ง์ ๋ํด์๋ ์๋ ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํด์ฃผ์ธ์!
- https://ko.reactjs.org/docs/thinking-in-react.html#step-3-identify-the-minimal-but-complete-representation-of-ui-state
- state ๋ก ๊ด๋ฆฌํ ํ์๊ฐ ์๋ ๊ฐ๋ค์ state ๋ฅผ ๋ง๋ค์ง ์๋๋ก ํด์ฃผ์ธ์. ... |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | - ๊ตฌ์กฐ ๋ถํด ํ ๋น ํ์ฉํด ์ฃผ์๋ฉด ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค!
```suggestion
const { name, value } = event.target;
this.setState({
[name]: value,
});
``` |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | - defaultColor ์ disabled ๋ฅผ state ์์ ๊ด๋ฆฌํ์ง ์๋๋ก ํ๋ค๋ฉด, ์ด ๋ก์ง ๋ถ๋ถ์ ๋ ์ด์ ํ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | - idInput ๊ณผ pwInput ์ ์ฌ์ฉํด์ ๋ฐ๋ก ๊ฐ์ ๊ณ์ฐํ ์ ์์ต๋๋ค. ์ฝ๋๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. ์ฐธ๊ณ ํด์ฃผ์ธ์!
- inline ์คํ์ผ๋ง์ ์ฃผ์๋ ๊ฒ์ ๊ผญ ํ์ํ ๊ฒฝ์ฐ๊ฐ ์๋๋ผ๋ฉด ์ง์ํด์ฃผ์๊ณ , className ์ ๋์ ์ผ๋ก ๋ถ์ฌํ๋ ๊ฒ์ผ๋ก ์คํ์ผ๋ง ํด์ฃผ์ธ์!
- inline ์คํ์ผ๋ง์ ์ฌ์ฉํ์๋ ๊ฒฝ์ฐ๋, ์ฌ๋ผ์ด๋๋ฅผ ๊ตฌํ๊ณผ ๊ฐ์ด ์คํ์ผ๋ง์ด ๋งค์ฐ ๋ง์ด ์ง์์ ์ผ๋ก ๋ณํด์ผ ํ๋ ์ํฉ์ ์ฌ์ฉํด ์ฃผ์๋ ๊ฒ๋๋ค!
```jsx
render () {
const { idInput, pwInput } = this.state;
isButtonActive = id... |
@@ -0,0 +1,46 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+@import '../../../styles/variable.scss';
+
+.Login {
+ .container {
+ width: 2000px;
+ max-width: 100vw;
+
+ .loginContainer {
+ width: 350px;
+ height: 400px;
+ margin: 25vh auto;
+ border: 2p... | Unknown | - common.scss ์ ์ ํฉํ๋ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,46 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+@import '../../../styles/variable.scss';
+
+.Login {
+ .container {
+ width: 2000px;
+ max-width: 100vw;
+
+ .loginContainer {
+ width: 350px;
+ height: 400px;
+ margin: 25vh auto;
+ border: 2p... | Unknown | - mixin ์ variable.scss ์ ๊ฐ์ ๋ณ๋์ ํ์ผ์ ํ๋ ๋ ๋ง๋ค์ด์ ๊ทธ๊ณณ์์ ์ผ๊ด์ ์ผ๋ก ๊ด๋ฆฌํด์ฃผ์ธ์! |
@@ -0,0 +1,46 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+@import '../../../styles/variable.scss';
+
+.Login {
+ .container {
+ width: 2000px;
+ max-width: 100vw;
+
+ .loginContainer {
+ width: 350px;
+ height: 400px;
+ margin: 25vh auto;
+ border: 2p... | Unknown | - ์คํ์ผ๋ง์ ๋ถ์ฌํ๊ธฐ ์ํจ์ผ๋ก๋ className ์ผ๋ก๋ ์ถฉ๋ถํฉ๋๋ค. id ๋ฅผ ์ฌ์ฉํ์ค ์ด์ ๊ฐ ์์ต๋๋ค. |
@@ -1,13 +1,108 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import Nav from '../../../components/Nav/Nav';
+import CommentList from '../Comment/CommentList';
+import './Main.scss';
class MainAh extends React.Component {
render() {
return (
- <div>
- <p>๋ช
์ฑ</p>
+... | JavaScript | - ๋ฐ๋ณต์ ์ธ ๊ตฌ์กฐ๊ฐ ๋ณด์ด๋ค์! ๊ทธ๋ฆฌ๊ณ ์ฌ์ค ์ด ๋ถ๋ถ์ ๋ฐฑ์๋์์ ์ ๋ณด๋ฅผ ๋ฐ์์์ ํ๋ฉด์ ๊ทธ๋ฆฌ๋ ๊ฒ์ด๋ฏ๋ก, ๋ชฉ์
๋ฐ์ดํฐ๋ฅผ ๊ตฌ์ฑํ์
์ map ํจ์๋ฅผ ์ฌ์ฉํ์ฌ ๊ตฌํํด์ฃผ์๋๊ฒ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -1,13 +1,108 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import Nav from '../../../components/Nav/Nav';
+import CommentList from '../Comment/CommentList';
+import './Main.scss';
class MainAh extends React.Component {
render() {
return (
- <div>
- <p>๋ช
์ฑ</p>
+... | JavaScript | - ์ฌ๊ธฐ๋ ์์ ๋์ผํฉ๋๋ค! |
@@ -0,0 +1,201 @@
+body {
+ margin: 0;
+}
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+
+.MainAh {
+ .mainContainer {
+ display: flex;
+ position: relative;
+ justify-content: center;
+ width: 2000px;
+ max-width: 100vw;
+ height: 2000px;
+ background-color: #fa... | Unknown | - reset.scss ์ ์ ํฉํด ๋ณด์ด๋ค์! |
@@ -0,0 +1,80 @@
+import React from 'react';
+import Comment from './Comment';
+import './CommentList.scss';
+
+class CommentList extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ commentInput: '',
+ newComment: [],
+ nickname: '',
+ commentList: [],
+ c... | JavaScript | ์ ์ฉ์๋ฃ~! ๋ค์ฌ๋ ์ต๊ณ ! |
@@ -0,0 +1,23 @@
+import React from 'react';
+import './Comment.scss';
+
+class NewComment extends React.Component {
+ render() {
+ // const newArray = this.props.newComment.map((commentarray, index) => (
+ // <li key={index}>
+ // <span className="newCommentid">{this.props.nickname}</span>
+ // ... | JavaScript | ์ง์ ์ต๋๋ค! |
@@ -0,0 +1,15 @@
+.comment {
+ .newComment {
+ margin-bottom: 5px;
+ }
+
+ .newCommentid {
+ font-weight: bold;
+ margin-bottom: 0;
+ }
+
+ .newComments {
+ font-weight: normal;
+ margin-left: 5px;
+ }
+} | Unknown | ์์ ํ์ต๋๋ค! |
@@ -0,0 +1,80 @@
+import React from 'react';
+import Comment from './Comment';
+import './CommentList.scss';
+
+class CommentList extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ commentInput: '',
+ newComment: [],
+ nickname: '',
+ commentList: [],
+ c... | JavaScript | ์ ์ฉํ์ต๋๋ค. ๊ตฌ์กฐ ๋ถํด ํ ๋น์ด ์ต์ํ์ง์์ ์จ์ผํ ๊ณณ์ ์ ๊ตฌ๋ถํ์ง ๋ชปํ๋๊ฒ ๊ฐ์ต๋๋ค.. ใ
|
@@ -0,0 +1,23 @@
+import React from 'react';
+import './Comment.scss';
+
+class NewComment extends React.Component {
+ render() {
+ // const newArray = this.props.newComment.map((commentarray, index) => (
+ // <li key={index}>
+ // <span className="newCommentid">{this.props.nickname}</span>
+ // ... | JavaScript | ์ ์ด๋ฐ ์ค์๋ฅผ ... ์์ ํ์ต๋๋ค! |
@@ -0,0 +1,80 @@
+import React from 'react';
+import Comment from './Comment';
+import './CommentList.scss';
+
+class CommentList extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ commentInput: '',
+ newComment: [],
+ nickname: '',
+ commentList: [],
+ c... | JavaScript | ์์์ ๋ฐ์์จ 'wecode-bootcamp' ๋ผ๋ id ๊ฐ์ ๋ฐ์์ค๊ธฐ ์ํด ์ฌ์ฉํ๋๋ฐ, ํ์คํ id ๋ผ๋๊ฒ์ ์ ์ ์น ์์ nickname ์ผ๋ก ์์ ํ์ต๋๋ค! |
@@ -0,0 +1,80 @@
+import React from 'react';
+import Comment from './Comment';
+import './CommentList.scss';
+
+class CommentList extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ commentInput: '',
+ newComment: [],
+ nickname: '',
+ commentList: [],
+ c... | JavaScript | ์ง์ ์ต๋๋ค! |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | ์์ ํ์ต๋๋ค! |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | defaultColor๋ ์์ ์ง์ฐ๊ณ ์ผํญ์ฐ์ฐ์๋ฅผ ์ด์ฉํ ํด๊ฒฐ๋ฐฉ๋ฒ์ ๋ฐ์ ์ฃผ์
์ ๊ทธ๊ฑฐ๋ก ์์ ๋ณํ๊น์ง ์ ์ฉํ์์ต๋๋ค. ์ํ๊ฐ ๋ณํ๋ค๊ณ ์๊ฐ๋๋๊ฒ์ ์๊พธ state๋ฅผ ์ด์ฉํ๊ฒ ๋๋๊ฑฐ ๊ฐ์ ๋ ๊ณต๋ถํ๊ฒ ์ต๋๋ค. |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | ์์ ํ์ต๋๋ค! |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | ํ๋จ์ ์ฃผ์ ํด๊ฒฐ๋ฒ์ผ๋ก ์์ ํ์ต๋๋ค! |
@@ -1,13 +1,92 @@
import React from 'react';
+import { withRouter } from 'react-router-dom';
+import './Login.scss';
class LoginAh extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ idInput: '',
+ pwInput: '',
+ };
+ }
+
+ loginTest = () => {
+ fetch('users/... | JavaScript | ์ ๋ง ๊ฐ์ฌํฉ๋๋ค. ๋ฌด์กฐ๊ฑด constructor ๋จ์์ ๋ณํ์ํค๋ ์ค ์๊ณ ๊ทธ๊ณณ์์๋ง ํด๊ฒฐํ๋ ค๊ณ ํ๋๋ฐ render์์ ๋ณ๊ฒฝํ๋ฉด ๋ ๊ฐ๋จํ๊ฒ ๋๋ ๊ฒ ๊ฐ์ต๋๋ค. inline ์คํ์ผ๋ง ์ง์ํ๊ฒ ์ต๋๋ค!!! |
@@ -0,0 +1,106 @@
+package nextstep.security.authorization.hierarchy;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+
+import java.util.Collection;
+import java.util.Set;
+
+import static org.assertj.core.... | Java | ๊ผผ๊ผผํ ํ
์คํธ ์ฝ๋ ๐ |
@@ -1,20 +1,22 @@
package nextstep.security.authorization;
import nextstep.security.authentication.Authentication;
+import nextstep.security.authorization.hierarchy.RoleHierarchy;
import java.util.Set;
public class AuthorityAuthorizationManager<T> implements AuthorizationManager<T> {
- private final Author... | Java | Spring Security์ AuthoritiesAuthorizationManager๋ String... authorities๋ฅผ ์ฌ์ฉํ์ฌ ๋ค์ค ๊ถํ์ ์ฒ๋ฆฌํ ์ ์๋๋ก ์ค๊ณ๋์์ต๋๋ค.
๊ฐ๋ณ์ธ์ ํ์ฉ์ ํตํด AuthorityAuthorizationManager๊ฐ ๋ ์ ์ฐํ๊ฒ ๋์ํ ์ ์๋๋ก ํด๋ณด๋ฉด ์ด๋จ๊น์? ๐
```suggestion
public AuthorityAuthorizationManager(RoleHierarchy roleHierarchy, String... authorities) {
``` |
@@ -0,0 +1,126 @@
+package nextstep.security.authorization.hierarchy;
+
+import org.springframework.util.Assert;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Queue;
+import ... | Java | ๋ค์๊ณผ ๊ฐ์ด ํด๋ณผ ์๋ ์๊ฒ ๋ค์ ๐
```suggestion
Set<String> childRoles = Set.of(impliedRoles);
``` |
@@ -0,0 +1,126 @@
+package nextstep.security.authorization.hierarchy;
+
+import org.springframework.util.Assert;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Queue;
+import ... | Java | ์ํ ์ฐธ์กฐ๊ฐ ์ผ์ด๋ ์ ์์ ๊ฒ ๊ฐ์์
์ญํ ๊ณ์ธต์ ์ค์ ํ ๋ ์ํ ์ฐธ์กฐ(์ฌ์ดํด)์ ๋ํ ์์ธ์ฒ๋ฆฌ๋ฅผ ํด๋ณด๋๊ฑด ์ด๋จ๊น์? ๐ |
@@ -0,0 +1,126 @@
+package nextstep.security.authorization.hierarchy;
+
+import org.springframework.util.Assert;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Queue;
+import ... | Java | Spring Security๋ ์ฑ๋ฅ ์ต์ ํ๋ฅผ ์ค์ํ๊ฒ ์๊ฐํ๋๋ฐ์,
ArrayDeque ์ฌ์ฉ์ ํตํด ์ฑ๋ฅ์ ํฅ์ ์์ผ๋ด๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค ๐
```suggestion
Queue<String> queue = new ArrayDeque<>(authorities);
``` |
@@ -1,20 +1,22 @@
package nextstep.security.authorization;
import nextstep.security.authentication.Authentication;
+import nextstep.security.authorization.hierarchy.RoleHierarchy;
import java.util.Set;
public class AuthorityAuthorizationManager<T> implements AuthorizationManager<T> {
- private final Author... | Java | Set ์ผ๋ก ์ค๋ณต์ ์ ๊ฑฐํด ์ฃผ์
จ๊ตฐ์ ๐ |
@@ -0,0 +1,15 @@
+{
+ "arrowParens": "always",
+ "bracketSpacing": true,
+ "jsxBracketSameLine": false,
+ "jsxSingleQuote": false,
+ "printWidth": 80,
+ "proseWrap": "always",
+ "quoteProps": "as-needed",
+ "semi": true,
+ "singleQuote": false,
+ "tabWidth": 2,
+ "trailingComma": "es5",
+ "useTabs": false,
... | Unknown | EOL์ด ์๋ค์ |
@@ -10,7 +10,17 @@
"@babel/core": "^7.23.0",
"@babel/preset-env": "^7.22.20",
"babel-jest": "^29.7.0",
- "jest": "29.6.0"
+ "eslint": "^8.56.0",
+ "eslint-config-airbnb": "^19.0.4",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-import": "^2.29.1",
+ "eslint-plugin-jsx-a11y": "^... | Unknown | ์ค.. husky๊น์ง |
@@ -0,0 +1,28 @@
+import GameMessage from "./GameMessage.js";
+import { VALID_INPUT_LENGTH } from "./gameConstants.js";
+
+class Validator {
+ static isValidInput(input) {
+ if (!this.isNumber(input))
+ throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER);
+ if (!this.isValidLength(input))
+ throw n... | JavaScript | 3์ด๋ผ๋ ์ซ์๋ ์ด๋ค ์๋ฏธ๋ฅผ ๊ฐ์ง๊ณ ์๋ ์ซ์ ๊ฐ์๋ฐ์,
์ด๋ฌํ ์ซ์๊ฐ ์ซ์ ๊ทธ๋๋ก ์กด์ฌํ๋ ๊ฒ์ ํํ ๋งค์ง๋๋ฒ๋ผ๊ณ ๋ถ๋ฆ
๋๋ค.
๋ฐ๋ผ์ ์ด๋ฌํ ์ซ์๋ ๋ค์์ ์ด์ ๋ก ์์ํ ํด์ฃผ๋ ๊ฒ์ด ์ข์ต๋๋ค.
1. ์์๋ก ์ซ์์ผ๊ตฌ ๊ฒ์์ ์ซ์๊ฐฏ์๊ฐ 4๋ก ๋์ด๋ฌ๋ค. ๊ทธ๋ ๋ค๋ฉด ๋ชจ๋ ํ์ผ์ ๋ค์ ธ์ 3์ 4๋ก ๊ณ ์ณ์ผํ๋ค. (๋ณ๊ฒฝ์ ์ฉ์ดํ์ง ์๋ค.)
2. ์ฒ์ ์จ๋ณด๋ฉ ํ๋ ์ฌ๋์ ์ด ์ซ์์ ์๋ฏธ๋ฅผ ํ์
ํ๊ธฐ ํ๋ค๋ค. ์ฝ๋ ๊ฐ๋
์ฑ์ด ์ค์ด๋ ๋ค. |
@@ -0,0 +1,28 @@
+import GameMessage from "./GameMessage.js";
+import { VALID_INPUT_LENGTH } from "./gameConstants.js";
+
+class Validator {
+ static isValidInput(input) {
+ if (!this.isNumber(input))
+ throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER);
+ if (!this.isValidLength(input))
+ throw n... | JavaScript | 1. ์ฝ๋๋ฅผ ๋ค์๊ณผ ๊ฐ์ด ๊ณ ์น๋ฉด ๋ ์ค์ด๋ญ๋๋ค ใ
ใ
```suggestion
const newArr = [...new Set(input)]
```
2. newArr์ด๋ผ๋ ์์๋ช
์ด ์ด๋ค ์๋ฏธ๋ฅผ ๋ด๊ณ ์๋ ์ด๋ฆ์ธ๊ฐ์? ์๋ฏธ๊ฐ ์๊ณ , ๋จ๋ฐ์ฑ์ผ๋ก ์ฌ์ฉ๋๋ ์ธก๋ฉด์์
์ด๋ ๊ฒ ์์ฑํด๋ ๋ ๊ฒ ๊ฐ์์.
```js
isDuplicate(input) {
if ([...new Set(input)].length !== 3) throw new Error(GameMessage.INVALID_INPUT_IS_DUPLICATED)
return true;
}... |
@@ -0,0 +1,28 @@
+import GameMessage from "./GameMessage.js";
+import { VALID_INPUT_LENGTH } from "./gameConstants.js";
+
+class Validator {
+ static isValidInput(input) {
+ if (!this.isNumber(input))
+ throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER);
+ if (!this.isValidLength(input))
+ throw n... | JavaScript | 1. ๊ฐ์ธ์ ์ธ ๊ฒฌํด๋ก๋ ๊ฒ์ฆํจ์์์๋ ํด๋น input์ด ์ ํจํ์ง/์ํ์ง(boolean) ํ๊ฐํ ๋ค์,
์ด ๊ฒฐ๊ณผ์ ๋ฐ๋ผ ์๋ฌ๋ฅผ ๋์ ธ์ฃผ๋ ํจํด์ ์ ํธํฉ๋๋ค.
๋ค์ ๋งํ๋ฉด ์๋ฌ๋ฅผ ๋์ ธ์ฃผ๋ ๋ถ๋ถ์ ์ด ํจ์(is..)๋ฅผ ํธ์ถํ๋ ๋ถ๋ถ์ผ๋ก ๋๊ธฐ๋ ๋ฐฉ์์ผ๋ก ํ๊ณคํฉ๋๋ค
2. ์ด๊ฒ static method๊ฐ ์๋ method์ผ ์ด์ ๊ฐ ์๋์? |
@@ -0,0 +1,28 @@
+import GameMessage from "./GameMessage.js";
+import { VALID_INPUT_LENGTH } from "./gameConstants.js";
+
+class Validator {
+ static isValidInput(input) {
+ if (!this.isNumber(input))
+ throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER);
+ if (!this.isValidLength(input))
+ throw n... | JavaScript | ํ์์๋ ์ฃผ์์ ์ง์ฐ๋ฉด ์ข๊ฒ ์ต๋๋ค ! |
@@ -0,0 +1,28 @@
+import GameMessage from "./GameMessage.js";
+import { VALID_INPUT_LENGTH } from "./gameConstants.js";
+
+class Validator {
+ static isValidInput(input) {
+ if (!this.isNumber(input))
+ throw new Error(GameMessage.INVALID_INPUT_NOT_A_NUMBER);
+ if (!this.isValidLength(input))
+ throw n... | JavaScript | boolean์ ๋ฆฌํดํ ๋๋ ๋ฉ์๋์ prefix์ is, has๋ฅผ ๋ถ์ฌ์ฃผ๋ ๊ฒ์ด ๊ด๋ก์
๋๋คใ
_ใ
|
@@ -0,0 +1,49 @@
+import { Random } from "@woowacourse/mission-utils";
+import {
+ VALID_INPUT_LENGTH,
+ MIN_RANDOM_NUMBER,
+ MAX_RANDOM_NUMBER,
+} from "./gameConstants.js";
+
+class Computer {
+ #solution;
+
+ seeSolution() {
+ return this.#solution;
+ }
+
+ makeSolution() {
+ const computer = [];
+ w... | JavaScript | ์ด๋ค ๊ตฌ๋ฌธ์๋ ์ธ๋ฏธ์ฝ๋ก ์ด ์๊ณ , ์ด๋ค ๊ตฌ๋ฌธ์๋ ์ธ๋ฏธ์ฝ๋ก ์ด ์์ง ์๋ค์.
๋ ์ค ํ๋๋ง ํ์๋ ๊ฑธ ์ถ์ฒ๋๋ฆฌ๊ณ , ๊ฐ์ ํ๊ณ ์ถ๋ค๋ฉด prettier๋ฑ์ ์ด์ฉํด๋ณด์ธ์. |
@@ -0,0 +1,49 @@
+import { Random } from "@woowacourse/mission-utils";
+import {
+ VALID_INPUT_LENGTH,
+ MIN_RANDOM_NUMBER,
+ MAX_RANDOM_NUMBER,
+} from "./gameConstants.js";
+
+class Computer {
+ #solution;
+
+ seeSolution() {
+ return this.#solution;
+ }
+
+ makeSolution() {
+ const computer = [];
+ w... | JavaScript | 1. ์ด๋ ๊ฒ๋ ๋ฉ๋๋ค.
```suggestion
const userInput = input.split("").map(Number);
```
2. ๋ฐฐ์ด์ด๋ฉด.. s๊ฐ ๋ถ์ผ๋ฉด ์ข์ง ์์๊น์? |
@@ -0,0 +1,49 @@
+import { Random } from "@woowacourse/mission-utils";
+import {
+ VALID_INPUT_LENGTH,
+ MIN_RANDOM_NUMBER,
+ MAX_RANDOM_NUMBER,
+} from "./gameConstants.js";
+
+class Computer {
+ #solution;
+
+ seeSolution() {
+ return this.#solution;
+ }
+
+ makeSolution() {
+ const computer = [];
+ w... | JavaScript | reduce๋ฅผ ์จ์๋ ๊ตฌํํ ์ ์๊ฒ ๋ค์
```js
const strikeAndBall = userInput.reduce((acc, cur) => {
if ((this.#solution.indexOf(item) === index) && this.#solution.includes(item)) return { ...acc, strike: acc.strike + 1 }
if ((this.#solution.indexOf(item) !== index) && this.#solution.includes(item)) return { ...acc, ball:acc.ball... |
@@ -0,0 +1,15 @@
+{
+ "arrowParens": "always",
+ "bracketSpacing": true,
+ "jsxBracketSameLine": false,
+ "jsxSingleQuote": false,
+ "printWidth": 80,
+ "proseWrap": "always",
+ "quoteProps": "as-needed",
+ "semi": true,
+ "singleQuote": false,
+ "tabWidth": 2,
+ "trailingComma": "es5",
+ "useTabs": false,
... | Unknown | ์ฝ๋๋ฅผ ๋ณด๋ฉด prettier๊ฐ ์ ์ฉ๋์ด์์ง ์์๋ฐ, ํ์ธํ๋ฒ ํด๋ณด์ธ์ฉ |
@@ -0,0 +1,49 @@
+import { Random } from "@woowacourse/mission-utils";
+import {
+ VALID_INPUT_LENGTH,
+ MIN_RANDOM_NUMBER,
+ MAX_RANDOM_NUMBER,
+} from "./gameConstants.js";
+
+class Computer {
+ #solution;
+
+ seeSolution() {
+ return this.#solution;
+ }
+
+ makeSolution() {
+ const computer = [];
+ w... | JavaScript | ์ด๊ฑธ ๋ฆฌํดํ๋ ์ด์ ๊ฐ ๋ญ๊ฐ์ ? |
@@ -1,5 +1,62 @@
+import { Console } from "@woowacourse/mission-utils";
+import User from "./User.js";
+import Computer from "./Computer.js";
+import Validator from "./Validator.js";
+import GameMessage from "./GameMessage.js";
+import { RETRY_RESPONSE, FULL_STRIKE } from "./gameConstants.js";
+
class App {
- async p... | JavaScript | indent๊ฐ.. |
@@ -1,5 +1,62 @@
+import { Console } from "@woowacourse/mission-utils";
+import User from "./User.js";
+import Computer from "./Computer.js";
+import Validator from "./Validator.js";
+import GameMessage from "./GameMessage.js";
+import { RETRY_RESPONSE, FULL_STRIKE } from "./gameConstants.js";
+
class App {
- async p... | JavaScript | ๋งค์ง๋๋ฒ๊ฐ ์ด์์ด์๋ค์ฉ |
@@ -1,5 +1,62 @@
+import { Console } from "@woowacourse/mission-utils";
+import User from "./User.js";
+import Computer from "./Computer.js";
+import Validator from "./Validator.js";
+import GameMessage from "./GameMessage.js";
+import { RETRY_RESPONSE, FULL_STRIKE } from "./gameConstants.js";
+
class App {
- async p... | JavaScript | ์ด๋ ๊ฒ eslint ๊ท์น์ ๋ฌด์ํ ๊ฑฐ๋ฉด eslint๋ฅผ ์ ์ฌ์ฉํ์๋์? |
@@ -1,20 +1,36 @@
package model;
+import java.util.ArrayList;
import java.util.List;
public class Lotto {
- private List<String> lottoNumbers;
+ private List<LottoNo> lottoNumbers;
- public Lotto(List<String> lottoNumbers) {
+ public Lotto(List<LottoNo> lottoNumbers) {
this.lottoNumbers ... | Java | ๋ก๋ ๋ฒํธ๋ฅผ Set ์ผ๋ก ๊ตฌํํ๋ ๊ฒ๊ณผ List ๋ก ๊ตฌํํ๋ ๊ฒ์ ๋น๊ตํด ๋ณด์์ ๋ ์ด๋ค ์ฅ๋จ์ ์ด ์์๊น์? ์ฌ๊ธฐ์๋ ์ด๋ค ์๋ฃ๊ตฌ์กฐ๊ฐ ์ด์ธ๋ฆด๊น์? |
@@ -1,20 +1,36 @@
package model;
+import java.util.ArrayList;
import java.util.List;
public class Lotto {
- private List<String> lottoNumbers;
+ private List<LottoNo> lottoNumbers;
- public Lotto(List<String> lottoNumbers) {
+ public Lotto(List<LottoNo> lottoNumbers) {
this.lottoNumbers ... | Java | ํ์ค์ด๋๋ผ๋ ๊ดํธ๋ฅผ ๋ถ์ฌ์ฃผ๋๊ฑธ ์ปจ๋ฒค์
์ผ๋ก ํฉ์๋ค.
์ด๊ฒ์ด ๊ฐ๊ฒฐํ๋๋ผ๋ ์ฝ๋ ์ฌ๋ ์
์ฅ์ผ๋ก ์ฝ๋๋ฅผ ๋ณด๋ฉด
๋น์ฐํ ์์ด์ผํ ๊ณณ์ ๋ฌด์ธ๊ฐ๊ฐ ๋น ์ง๊ฒ ๋๋ฉด ๊ฐ๋
์ฑ์ด ์ ํ๋ฉ๋๋ค. (์ฑ
์ฝ์ ๋์ ๋น์ท)
๊ทธ๋ฆฌ๊ณ ์์ฑ์์์ ๋ญ๊ฐ ๋ง์ ์ผ์ ํด์ฃผ๋๊ฒ ์์ฝ๋ค์ |
@@ -1,20 +1,36 @@
package model;
+import java.util.ArrayList;
import java.util.List;
public class Lotto {
- private List<String> lottoNumbers;
+ private List<LottoNo> lottoNumbers;
- public Lotto(List<String> lottoNumbers) {
+ public Lotto(List<LottoNo> lottoNumbers) {
this.lottoNumbers ... | Java | boolean์ int ๋ก ๋ณํํด์ฃผ๋ ์ด์ ๋ ๋ญ๊ฐ์? |
@@ -1,20 +1,36 @@
package model;
+import java.util.ArrayList;
import java.util.List;
public class Lotto {
- private List<String> lottoNumbers;
+ private List<LottoNo> lottoNumbers;
- public Lotto(List<String> lottoNumbers) {
+ public Lotto(List<LottoNo> lottoNumbers) {
this.lottoNumbers ... | Java | ์ด ๋ถ๋ถ ์ข ๋ ๊ฐ์ ํด๋ณด์ธ์ |
@@ -1,20 +1,36 @@
package model;
+import java.util.ArrayList;
import java.util.List;
public class Lotto {
- private List<String> lottoNumbers;
+ private List<LottoNo> lottoNumbers;
- public Lotto(List<String> lottoNumbers) {
+ public Lotto(List<LottoNo> lottoNumbers) {
this.lottoNumbers ... | Java | x ๋ฅผ ์ข ๋ ์๋ฏธ์๋ ๋ณ์์ด๋ฆ์ผ๋ก ์ง์์ผ๋ฉด ์ข์์ ๊ฒ ๊ฐ์ต๋๋ค.
๊ทธ๋ฆฌ๊ณ ๋ฉ์๋ ์ฒด์ด๋ ๋ฐฉ์์์๋ ๊ธธ์ด๊ฐ ๊ธธ์ด์ง๋ฉด IDE์์ ํ๋์ ํ์ธํ๊ธฐ ํ๋๋๊น
๊ฐ๋
์ฑ์ ์ํด ์ํฐ๋ก ๋ผ์ธ์ ๋ฆฌ๋ฅผ ์ด๋์ ๋ ํด์ฃผ๋ ๊ฒ์ด ์ข์ต๋๋ค.
์ด๋ฅผ ์ํ ์ปจ๋ฒค์
๋ intellij code style ์์ ์๋์ ๋ ฌ ์ค์ ํ ์ ์๊ธด ํฉ๋๋ค(์ ๋ ์ฌ์ฉ์ค) |
@@ -1,10 +1,8 @@
package model;
-import util.ListGenerator;
import util.SplitGenerator;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -13,43 +11,44 @@ public class LottoMachine {
private static int LOTTO_NUMBER_RANGE = 45;
private stat... | Java | getter ์ ํท๊ฐ๋ฆฌ๋ฏ๋ก calculateRandomNumbers ์ฒ๋ผ ๋ค๋ฅธ ๋จ์ด๋ฅผ ํ์ฉํด๋ณด์๋๊ฑธ ์ถ์ฒ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.