code
stringlengths
41
34.3k
lang
stringclasses
8 values
review
stringlengths
1
4.74k
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
import ์ˆœ์„œ์—๋„ ์œ ์ง€๋ณด์ˆ˜ ๋ฐ ๊ฐ€๋…์„ฑ์„ ์œ„ํ•œ ์ปจ๋ฒค์…˜์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์œ„์ฝ”๋“œ์˜ ์ปจ๋ฒค์…˜์€ ๊ฐ„๋žตํ•˜๊ฒŒ ์•„๋ž˜์™€ ๊ฐ™๊ณ , ์ฐธ๊ณ ํ•ด์„œ ์ˆ˜์ •ํ•ด ์ฃผ์„ธ์š”! - ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ - React ๊ด€๋ จ ํŒจํ‚ค์ง€ - ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ - ์ปดํฌ๋„ŒํŠธ - ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ โ†’ ๋จผ ์ปดํฌ๋„ŒํŠธ โ†’ ๊ฐ€๊นŒ์šด ์ปดํฌ๋„ŒํŠธ - ํ•จ์ˆ˜, ๋ณ€์ˆ˜ ๋ฐ ์„ค์ • ํŒŒ์ผ - ์‚ฌ์ง„ ๋“ฑ ๋ฏธ๋””์–ด ํŒŒ์ผ(`.png`) - css ํŒŒ์ผ (.`scss`)
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
event ๊ฐ์ฒด์—๋Š” ์—ฌ๋Ÿฌ ๋ฐ์ดํ„ฐ๊ฐ€ ๋‹ด๊ฒจ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ ์ค‘์—์„œ target์˜ value(input์— ์ž…๋ ฅํ•œ ๊ฐ’)๋งŒ์„ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•  ๋•Œ ์ธ์ž๋กœ ์•„์˜ˆ event.target.value๋งŒ์„ ์ธ์ž๋กœ ๋„˜๊ฒจ์„œ ์‚ฌ์šฉํ•˜๋ฉด ์ด ํ•จ์ˆ˜์˜ ์‚ฌ์šฉ์ด ์ข€ ๋” ๋ช…ํ™•ํ•˜๊ฒ ๋„ค์š”!
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
์‹ค์ˆ˜๋กœ ๋ˆŒ๋ €์„ ๊ฒฝ์šฐ์—๋„ ๋ฌด์กฐ๊ฑด list ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•˜๊ฒŒ ๋  ํ…๋ฐ, ์„ ํƒ๊ถŒ์„ ์ค„ ์ˆ˜๋„ ์žˆ๊ฒ ๋„ค์š”. `window.confirm` ํ•จ์ˆ˜์— ๋Œ€ํ•ด ์ฐพ์•„๋ณด๊ณ  ์ ์šฉํ•ด๋ณด์…”๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
fetch ํ•จ์ˆ˜์˜ ์ธ์ž๋Š” ๋ณดํ†ต 2๊ฐœ๊ฐ€ ๋“ค์–ด๊ฐ€๋Š”๋ฐ, ์ง€๊ธˆ์€ ์˜ต์…˜์— ๊ด€๋ จ๋œ ๋‘ ๋ฒˆ์งธ ์ธ์ž๋งŒ ์ž‘์„ฑ๋˜์–ด ์žˆ๋„ค์š”! ์‹ค์ œ๋กœ ํ†ต์‹ ํ•˜์‹ค ๋•Œ์—๋Š” ์ฒซ ๋ฒˆ์งธ ์ธ์ž์ธ `API` ๊ฐ’๋„ ์ž˜ ์ „๋‹ฌํ•ด ์ฃผ์„ธ์š”!
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ถˆํ•„์š”ํ•˜๊ฒŒ 3์ค‘์œผ๋กœ ๊ฐ์‹ธ๊ณ  ์žˆ๋Š” ๊ฒƒ ๊ฐ™์€๋ฐ, ์ผ๋‹จ ์ตœ์ƒ์œ„์˜ div๋Š” ๋ถˆํ•„์š”ํ•ด ๋ณด์ด๋„ค์š”! ์š”์†Œ๊ฐ€ ์ค‘์ฒฉ๋  ์ˆ˜๋ก, ํ”„๋กœ์ ํŠธ์˜ ๊ทœ๋ชจ๊ฐ€ ์ปค์งˆ ์ˆ˜๋ก ๋กœ๋”ฉ๋˜๋Š” ์‹œ๊ฐ„์ด ๊ธธ์–ด์ง€๊ธฐ ๋•Œ๋ฌธ์— ๋ถˆํ•„์š”ํ•˜๊ฒŒ ์ค‘์ฒฉ๋œ ์š”์†Œ๋Š” ์ง€์›Œ์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค!
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
img ํƒœ๊ทธ์˜ alt ๊ฐ’์€ ์–ด๋””์— ํ™œ์šฉ๋ ๊นŒ์š”? ์ฐพ์•„๋ณด์‹œ๊ณ  ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”!
@@ -0,0 +1,79 @@ +.userBox { + margin: 20px; + gap: 0 24px; + display: flex; + justify-content: center; + flex-direction: column; + + .userWrap { + display: flex; + flex-direction: row; + justify-content: center; + + .user { + width: 50px; + height: 50px; + border-radius: 50%; + } + ...
Unknown
PR์ด ๋จธ์ง€๋œ๋‹ค๋ฉด, ์ด ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“  button ํƒœ๊ทธ์— `width: 120px, height: 50px` ์†์„ฑ์ด ์ ์šฉ๋˜๊ฒ ๋„ค์š”! ์ด๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์œ„์— ์ž˜ ํ•ด์ฃผ์‹  ๊ฒƒ์ฒ˜๋Ÿผ nesting๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ถ”๊ฐ€๋กœ, ํƒœ๊ทธ ์„ ํƒ์ž์˜ ์‚ฌ์šฉ์€ ๋‹ค์Œ์˜ ๊ฒฝ์šฐ ์™ธ์—๋Š” ์ง€์–‘ํ•˜๋Š” ๊ฒŒ ์ข‹์Šต๋‹ˆ๋‹ค. 1. ์ „์—ญ์— ์ ์šฉ๋˜์–ด์•ผ ํ•˜๋Š” ์Šคํƒ€์ผ (e.g. common.scss, reset.scss) 2. ์•ž์œผ๋กœ๋„ ๋ณ€๊ฒฝ๋˜์ง€ ์•Š๋Š”๋‹ค๋Š” ํ™•์‹ ์ด ์žˆ๋Š” ์š”์†Œ className์„ ๋ถ€์—ฌํ•ด์„œ ์Šคํƒ€์ผ ์†์„ฑ ๋ถ€์—ฌํ•ด ์ฃผ์„ธ์š”!
@@ -1,7 +1,17 @@ @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap'); - * { box-sizing: border-box; font-family: 'Noto Sans KR', sans-serif; -} \ No newline at end of file +} +body { + width: 100vw; + height: 100vh; + display: flex; + align-items:...
Unknown
๊ณต์šฉ ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ด์„œ ์˜ฌ๋ ค์ฃผ์…จ๋Š”๋ฐ, ๊ณต์šฉ ํŒŒ์ผ์˜ ์ˆ˜์ •์€ 1. ํŒ€์›๊ณผ์˜ ์ถฉ๋ถ„ํ•œ ์ƒ์˜ ํ›„์— 2. ํ•ด๋‹น ํŒŒ์ผ๋งŒ ์ˆ˜์ •ํ•˜๋Š” ๋‚ด์šฉ์˜ PR ์„ ์˜ฌ๋ ค์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค!
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ฉ˜ํ† ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ฉ˜ํ†  ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ฉ˜ํ†  ๋ฆฌ๋ทฐ ๋ฐ˜์˜์™„๋ฃŒ
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
alt ์†์„ฑ์€ ํ™”๋ฉด์— ์ด๋ฏธ์ง€๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š์„๋•Œ ์‚ฌ์šฉ์ž๊ฐ€ ์•Œ ์ˆ˜ ์žˆ๋„๋ก ๋Œ€์ฒด ํ…์ŠคํŠธ๋ฅผ ์ œ๊ณตํ•˜๋Š” ์—ญํ• ์„ ํ•˜๊ธฐ ๋–„๋ฌธ์— alt ๊ฐ’์— userPicture๋ฅผ ๋„ฃ๊ฒ ์๋‹ˆ๋‹ค..
@@ -0,0 +1,79 @@ +.userBox { + margin: 20px; + gap: 0 24px; + display: flex; + justify-content: center; + flex-direction: column; + + .userWrap { + display: flex; + flex-direction: row; + justify-content: center; + + .user { + width: 50px; + height: 50px; + border-radius: 50%; + } + ...
Unknown
๋ฉ˜ํ†  ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋„ต!
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ฉ˜ํ†  ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ(?)
@@ -27,6 +27,7 @@ public class RecommendController { private final RecommendService recommendService; private final ReviewService reviewService; + // ์„ ํƒํ•œ ๋ฆฌ๋ทฐ ์ถ”์ฒœํ•˜๊ธฐ @PostMapping("/{reviewId}") public ResponseEntity<Long> createRecommend( @AuthenticationPrincipal WebtyUserDetails webtyUserDetails, @@ -36,6 +37...
Java
// ํŠน์ • ์œ ์ €์˜ ์ถ”์ฒœ ๋ฆฌ๋ทฐ ์กฐํšŒ -> // ๋กœ๊ทธ์ธํ•œ ์‚ฌ์šฉ์ž ๊ธฐ์ค€) ์ถ”์ฒœํ•œ ๋ฆฌ๋ทฐ ๋ชฉ๋ก ์กฐํšŒ
@@ -27,6 +27,7 @@ public class RecommendController { private final RecommendService recommendService; private final ReviewService reviewService; + // ์„ ํƒํ•œ ๋ฆฌ๋ทฐ ์ถ”์ฒœํ•˜๊ธฐ @PostMapping("/{reviewId}") public ResponseEntity<Long> createRecommend( @AuthenticationPrincipal WebtyUserDetails webtyUserDetails, @@ -36,6 +37...
Java
// ํŠน์ • ๋ฆฌ๋ทฐ์˜ ๋กœ๊ทธ์ธ๋œ ์œ ์ € ์ถ”์ฒœ ํ˜„ํ™ฉ ์กฐํšŒ -> // ๋กœ๊ทธ์ธํ•œ ์‚ฌ์šฉ์ž ๊ธฐ์ค€) ํ•ด๋‹น ๋ฆฌ๋ทฐ๊ธ€์˜ ์ถ”์ฒœ ์—ฌ๋ถ€ ๋ฐ˜ํ™˜
@@ -0,0 +1,48 @@ +import { SERVER } from '@/constants/url'; +import axios from 'axios'; + +interface CreateReviewParams { + userId: string; + travelId: string; + reviewImgs: File[]; + travelScore: number; + content: string; + title: string; + guideScore?: number; +} + +export const createReview = async ({ + use...
TypeScript
_:warning: Potential issue_ **ํผ ๋ฐ์ดํ„ฐ ๊ตฌ์„ฑ ์‹œ 0์  ์ฒ˜๋ฆฌ ์ฃผ์˜** `guideScore`๊ฐ€ 0์ ์ด๋ฉด `if (guideScore)` ์กฐ๊ฑด์—์„œ๋Š” ๋ˆ„๋ฝ๋ฉ๋‹ˆ๋‹ค. ์œ ์ €๊ฐ€ ์˜๋„์ ์œผ๋กœ 0์ ์„ ์ž…๋ ฅํ•  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค๋ฉด, ์กฐ๊ฑด๋ฌธ์„ `guideScore !== undefined` ๋“ฑ์˜ ๋ฐฉ์‹์œผ๋กœ ์ˆ˜์ •ํ•ด๋ณด์„ธ์š”. ```diff - if (guideScore) { + if (guideScore !== undefined && guideScore !== null) { formData.append('guideScore', guideScore.toS...
@@ -11,6 +11,10 @@ import GuideProfile from '@/components/GuideProfile'; import StarRating from '@/components/StarRating'; import FileUploadBtn from '@/components/FileUploadBtn'; +import useCreateReview from '@/hooks/query/useCreateReview'; +import { ShowToast } from '@/components/Toast'; +import { REVIEW_CONSTANTS...
Unknown
_:warning: Potential issue_ **์ œ์ถœ ๋ฒ„ํŠผ ๋กœ๋”ฉ ์ƒํƒœ ๊ตฌํ˜„ ์ˆ˜์ • ํ•„์š”** ํ˜„์žฌ ๊ตฌํ˜„์— ๋ฌธ๋ฒ•์  ์˜ค๋ฅ˜๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ํ…œํ”Œ๋ฆฟ ๋ฆฌํ„ฐ๋Ÿด๊ณผ ์กฐ๊ฑด๋ถ€ ๋ Œ๋”๋ง์ด ์ž˜๋ชป ์‚ฌ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ```diff - ${isLoading && - `cursor: not-allowed; - opacity: 0.5; - `} + ${isLoading ? ` + cursor:...
@@ -11,6 +11,10 @@ import GuideProfile from '@/components/GuideProfile'; import StarRating from '@/components/StarRating'; import FileUploadBtn from '@/components/FileUploadBtn'; +import useCreateReview from '@/hooks/query/useCreateReview'; +import { ShowToast } from '@/components/Toast'; +import { REVIEW_CONSTANTS...
Unknown
_:hammer_and_wrench: Refactor suggestion_ **๋ฎคํ…Œ์ด์…˜ ์—๋Ÿฌ ์ฒ˜๋ฆฌ ์ถ”๊ฐ€ ํ•„์š”** ์„ฑ๊ณต ์‹œ ์ฒ˜๋ฆฌ๋Š” ์ž˜ ๋˜์–ด์žˆ์ง€๋งŒ, ์‹คํŒจ ์‹œ ์ฒ˜๋ฆฌ๊ฐ€ ๋ˆ„๋ฝ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ```diff mutate( { userId, travelId, reviewImgs: files, travelScore: travelRating, content: reviewContent, title: reviewTitle, ...(userRating ...
@@ -11,6 +11,10 @@ import GuideProfile from '@/components/GuideProfile'; import StarRating from '@/components/StarRating'; import FileUploadBtn from '@/components/FileUploadBtn'; +import useCreateReview from '@/hooks/query/useCreateReview'; +import { ShowToast } from '@/components/Toast'; +import { REVIEW_CONSTANTS...
Unknown
_:hammer_and_wrench: Refactor suggestion_ **ํผ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๋ณด์™„ ํ•„์š”** ํ˜„์žฌ๋Š” ๊ธฐ๋ณธ์ ์ธ ๊ฒ€์‚ฌ๋งŒ ์ˆ˜ํ–‰ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ถ”๊ฐ€์ ์ธ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ```diff + const MAX_CONTENT_LENGTH = 1000; + + if (reviewContent.length > MAX_CONTENT_LENGTH) { + ShowToast(`๋ฆฌ๋ทฐ ๋‚ด์šฉ์€ ${MAX_CONTENT_LENGTH}์ž๋ฅผ ์ดˆ๊ณผํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.`, 'failed'); + return; + } + if (rev...
@@ -1,11 +1,11 @@ import DeleteIcon from '@/components/DeleteIcon'; import { textEllipsis } from '@/styles/GlobalStyles'; import { Review } from '@/types/reviewType'; -import { dateToString } from '@/utils/dataToString'; import { css } from '@emotion/react'; import Rating from '@/components/Rating'; import Prof...
Unknown
_:hammer_and_wrench: Refactor suggestion_ **๋ชจ๋ฐ”์ผ ํ™˜๊ฒฝ์„ ๊ณ ๋ คํ•œ ๋ฐ˜์‘ํ˜• ๋””์ž์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.** `min-width: 530px`๋Š” ๋ชจ๋ฐ”์ผ ๊ธฐ๊ธฐ์—์„œ ๊ฐ€๋กœ ์Šคํฌ๋กค์„ ๋ฐœ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฏธ๋””์–ด ์ฟผ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ชจ๋ฐ”์ผ ํ™˜๊ฒฝ์—์„œ๋Š” ๋‹ค๋ฅธ ๊ฐ’์„ ์ ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค. ```diff const reviewStyle = css` - min-width: 530px; + width: 100%; + @media (min-width: 530px) { + min-width: 530px; + } ``` <!-- suggesti...
@@ -1,11 +1,11 @@ import DeleteIcon from '@/components/DeleteIcon'; import { textEllipsis } from '@/styles/GlobalStyles'; import { Review } from '@/types/reviewType'; -import { dateToString } from '@/utils/dataToString'; import { css } from '@emotion/react'; import Rating from '@/components/Rating'; import Prof...
Unknown
_:warning: Potential issue_ **์ด๋ฏธ์ง€ ๋ Œ๋”๋ง ์‹œ key prop์ด ์ž˜๋ชป๋œ ์œ„์น˜์— ์žˆ์Šต๋‹ˆ๋‹ค.** ํ˜„์žฌ `key` prop์ด `img` ํƒœ๊ทธ์— ์žˆ์ง€๋งŒ, map ํ•จ์ˆ˜์˜ ์ตœ์ƒ์œ„ ์š”์†Œ์ธ `div`๋กœ ์ด๋™ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ, ์ด๋ฏธ์ง€ URL์„ key๋กœ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด index๋ณด๋‹ค ๋” ์•ˆ์ •์ ์ž…๋‹ˆ๋‹ค. ```diff {Array.isArray(review.imgSrc) && review.imgSrc.length > 0 && review.imgSrc.map((src, index) => ( - <div className="imgCon...
@@ -1,58 +1,52 @@ -import reviewImage from '@/assets/reviewImg.png'; import ReviewCard from '@/components/myReview/ReviewCard'; -import { Review } from '@/types/reviewType'; -// import ReviewWriteModal from '@/components/myReview/ReviewWriteModal'; - -const data: { reviews: Review[] } = { - reviews: [ - { - r...
Unknown
_:hammer_and_wrench: Refactor suggestion_ **์‚ฌ์šฉ์ž ID ํƒ€์ž… ์บ์ŠคํŒ… ๊ฐœ์„  ํ•„์š”** ์‚ฌ์šฉ์ž ID๋ฅผ ๋ฌธ์ž์—ด๋กœ ๊ฐ•์ œ ์บ์ŠคํŒ…ํ•˜๋Š” ๋ถ€๋ถ„์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํƒ€์ž… ์•ˆ์ „์„ฑ์„ ๋†’์ด๊ธฐ ์œ„ํ•ด ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค: ```diff - userId: (user?.userId as string) || '', + userId: user?.userId ?? '', ``` <!-- suggestion_start --> <details> <summary>๐Ÿ“ Committable suggestion</summary>...
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import styled from "@emotion/styled"; import { css, Theme } from "@emotion/react"; import CheckIcon from "components/inputs/TextInput/CheckIcon"; -import { TConditionCheck } from "./types/TConditionCheck"; +import { TConditionCheck } from "component...
Unknown
์‚ฌ์†Œํ•˜์ง€๋งŒ `height ?? "auto"` ๋„ ๊ดœ์ฐฎ์„ ๊ฒƒ ๊ฐ™์•„์š”!
@@ -0,0 +1,170 @@ +import styled from "@emotion/styled"; +import IconStarFilled from "components/rating/icons/IconStarFilled"; +import IconStarHalf from "components/rating/icons/IconStarHalf"; +import IconStarOutlined from "components/rating/icons/IconStarOutlined"; +import { HTMLAttributes, useEffect, useState, useRef...
Unknown
์˜ค ์ด ์ปดํฌ๋„ŒํŠธ๋Š” ์•„์ง Rating์ชฝ์ด ๋จธ์ง€ ๋˜์ง€ ์•Š์•„์„œ ์ผ๋ถ€ ๋‚ด์šฉ์„ ๊ทธ๋Œ€๋กœ ๊ฐ€์ง€๊ณ  ์˜ค์‹  ๋ถ€๋ถ„์ธ๊ฐ€์šฉ~? (+ `isInput` ๋ชจ๋“œ ์ถ”๊ฐ€๋กœ์š”?)
@@ -0,0 +1,170 @@ +import styled from "@emotion/styled"; +import IconStarFilled from "components/rating/icons/IconStarFilled"; +import IconStarHalf from "components/rating/icons/IconStarHalf"; +import IconStarOutlined from "components/rating/icons/IconStarOutlined"; +import { HTMLAttributes, useEffect, useState, useRef...
Unknown
์˜ค... ๋›ฐ์–ด๋‚œ ์‚ฌ์šฉ์„ฑ์ผ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ๐Ÿ˜† ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,120 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Rating from "components/rating/Rating"; +import IconEditFilledWhite from "components/icons/IconEditFilledWhite"; +import Link from "next/link"; +import dayjs from "dayjs"; + +interface Pr...
Unknown
์˜ค..! ์ €ํฌ๊ฐ€ `dayjs` ๋„ ์“ฐ๊ณ  ์žˆ์–ด์„œ ํ™œ์šฉํ•ด๋ณด์‹œ๋Š” ๊ฒƒ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ์ด๋Ÿฐ ๊ฒฝ์šฐ ```tsx import dayjs from 'dayjs'; const formattedDate= dayjs(date).format("YY/MM/DD") ``` ์ด๋ ‡๊ฒŒ ํ™œ์šฉํ•ด๋ณผ ์ˆ˜๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค~
@@ -0,0 +1,120 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Rating from "components/rating/Rating"; +import IconEditFilledWhite from "components/icons/IconEditFilledWhite"; +import Link from "next/link"; +import dayjs from "dayjs"; + +interface Pr...
Unknown
`className` ์€ ๋”ฐ๋กœ ์ปจ๋ฒค์…˜์ด ์žˆ๋Š” ๊ฒƒ์€ ์•„๋‹ˆ์ง€๋งŒ ๋Œ€๋ถ€๋ถ„ kebab case ๋ฅผ ์ ์šฉํ•˜๊ณ  ์žˆ์–ด `user-info-score-div` ์ด๋Ÿฐ ์‹์€ ์–ด๋–จ๊นŒ์š”~?
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
์ด `restaurantId` ๊ฐ€ `string[]` ๋„ ๋ฐ›๊ฒŒ ํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”~?
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
์•— ์—ฌ๊ธฐ๋„ `over-title-div` ์ด๋ ‡๊ฒŒ ๊ฐ€ ์–ด๋–จ๊นŒ์š” !
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
์—ฌ๊ธฐ๋Š” ์ด ํŽ˜์ด์ง€์—์„œ ๊ฑฐ์˜ ๋ฉ”์ธ ๊ธ‰ ์ œ๋ชฉ์ธ ๊ฒƒ ๊ฐ™์€๋ฐ `<h1 />` ํƒœ๊ทธ ์ •๋„๋กœ ์‚ฌ์šฉํ•˜๋ฉด ์–ด๋–จ๊นŒ์š”~? ์•„๋ž˜๋Š” ๋ ˆํผ๋Ÿฐ์Šค์šฉ [ํŽ˜์ด์Šค๋ถ] ์˜ ๋ฉค๋ฒ„ ์ƒ์„ธ ํŽ˜์ด์ง€์ธ๋ฐ ์„œ๋น„์Šค ์ œ๋ชฉ (์ €ํฌ๋กœ ์น˜๋ฉด '์ฉ์ฉ๋Œ€ํ•™') ์€ `<h2/>` ํƒœ๊ทธ, ์œ ์ € ์ด๋ฆ„์€ `<h1/>` ์œผ๋กœ ์‚ฌ์šฉํ•œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ €ํฌ๋„ ์˜คํžˆ๋ ค ์ƒ๋‹จ navbar ์—์„œ [์ฉ์ฉ๋Œ€ํ•™] ์„ `<h2 />` ๋กœ ๋ฐ”๊พธ๊ณ  ๋ง›์ง‘์ด๋‚˜ ๋‹จ์ฒด ์ƒ์„ธ ํŽ˜์ด์ง€์—์„œ ๋ง›์ง‘์ด๋ฆ„, ๋‹จ์ฒด์ด๋ฆ„์€ `<h1/>` ์— ๋„ฃ์œผ๋ฉด semantic tagging ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ SEO ์—๋„ ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! cc. @hoon5083 ![i...
@@ -0,0 +1,85 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Button from "components/button/Button"; + +interface Props { + imgSrcList: string[]; +} + +const RestaurantDetailImgSection: React.FC<Props> = ({ imgSrcList }) => { + const [currentImgIn...
Unknown
ํ˜น์‹œ ์ด ๋ฒ„ํŠผ์€ ํ™”๋ฉด์ƒ์˜ ์–ด๋А ๋ถ€๋ถ„์ธ๊ฐ€์šฉ~? ๋กœ์ปฌ์—์„œ ๋Œ๋ ธ์„ ๋•Œ ๋…ธ์ถœ๋˜์ง€ ์•Š๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ![image](https://github.com/SystemConsultantGroup/foodhub-frontend/assets/86560973/c705c6dd-3624-40d6-8639-8764bd45609d)
@@ -0,0 +1,70 @@ +import styled from "@emotion/styled"; +import RestaurantDetailImgSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailImgSection"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +imp...
Unknown
์ž„์‹œ ์ฝ”๋“œ์ธ๊ฐ€์š”!? ๊ฐ์ฒด๊ตฌ์กฐ ๋ถ„ํ•ด๋กœ ๋ฐ›์•„์˜ค๋Š” ๊ฒƒ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ```tsx const { totalScore, totalCount, totalPages, scoreStatistics } = reviewPage1 ```
@@ -0,0 +1,137 @@ +import styled from "@emotion/styled"; +import Rating from "components/rating/Rating"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +import Button from "components/button/Button"; +import TextInput from "components...
Unknown
์˜คํƒ€๊ฐ€ ์žˆ๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,137 @@ +import styled from "@emotion/styled"; +import Rating from "components/rating/Rating"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +import Button from "components/button/Button"; +import TextInput from "components...
Unknown
์š” ๊ฐ’์„ `src/constant/limit.ts` ์—์„œ ๊ด€๋ฆฌํ•ด์ฃผ๋Š” ๊ฒƒ์€ ์–ด๋–จ๊นŒ์š”~? ํ•˜๋‚˜์˜ ํŒŒ์ผ์—์„œ ๊ฐ ์ตœ๋Œ€๊ธธ์ด๋‚˜ ์ตœ์†Œ๊ธธ์ด ์กฐ๊ฑด ๋“ฑ์„ ๊ด€๋ฆฌํ•ด์ฃผ๋ฉด ๋‚˜์ค‘์— ์ด๋ฅผ ์ฆ๊ฐ€ ๋˜๋Š” ๊ฐ์†Œ์‹œํ‚ฌ ์ผ์ด ์žˆ์„ ๋•Œ ๋Œ€์‘ํ•˜๊ธฐ ์šฉ์ดํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,18 @@ +import styled from "@emotion/styled"; +import RestaurantsReviewForm from "feature/restaurants/restaurantsReview/components/form/RestaurantsReviewForm"; + +interface Props { + restaurantId: string; +} + +const ViewRestaurantReviewCreate: React.FC<Props> = ({ restaurantId }) => { + return ( + <Emot...
Unknown
์—ฌ๊ธฐ์„œ๋„ `string []` ์„ ํŠน๋ณ„ํžˆ ์ถ”๊ฐ€ํ•ด์ฃผ์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”~?
@@ -0,0 +1,170 @@ +import styled from "@emotion/styled"; +import IconStarFilled from "components/rating/icons/IconStarFilled"; +import IconStarHalf from "components/rating/icons/IconStarHalf"; +import IconStarOutlined from "components/rating/icons/IconStarOutlined"; +import { HTMLAttributes, useEffect, useState, useRef...
Unknown
๋„ต ๋งž์Šต๋‹ˆ๋‹ค..!
@@ -0,0 +1,85 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Button from "components/button/Button"; + +interface Props { + imgSrcList: string[]; +} + +const RestaurantDetailImgSection: React.FC<Props> = ({ imgSrcList }) => { + const [currentImgIn...
Unknown
์•— ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋”๋ฅผ ๊ตฌํ˜„ํ•˜๋ ค๋‹ค๊ฐ€ ์ผ๋‹จ PR๋ถ€ํ„ฐ ์˜ฌ๋ ธ๋Š”๋ฐ, ํ•ด๋‹น ๋ฒ„ํŠผ์€ ๊ทธ ๊ณผ์ •์—์„œ ์ƒ๊ธด ๋ณ„ ์˜๋ฏธ ์—†๋Š” ๋ฒ„ํŠผ์ž…๋‹ˆ๋‹ค.. ์‚ญ์ œํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,70 @@ +import styled from "@emotion/styled"; +import RestaurantDetailImgSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailImgSection"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +imp...
Unknown
ํ™•์ธ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,137 @@ +import styled from "@emotion/styled"; +import Rating from "components/rating/Rating"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +import Button from "components/button/Button"; +import TextInput from "components...
Unknown
๋ฐœ๊ฒฌ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,137 @@ +import styled from "@emotion/styled"; +import Rating from "components/rating/Rating"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +import Button from "components/button/Button"; +import TextInput from "components...
Unknown
๋„ต ์ข‹์Šต๋‹ˆ๋‹ค! ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,85 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Button from "components/button/Button"; + +interface Props { + imgSrcList: string[]; +} + +const RestaurantDetailImgSection: React.FC<Props> = ({ imgSrcList }) => { + const [currentImgIn...
Unknown
์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋”๋Š” ์•„์ง ๊ตฌํ˜„ํ•˜์ง€ ์•Š์•˜์ง€๋งŒ, ์ผ๋‹จ ์ด๋ฏธ์ง€ ์ „ํ™˜์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ๋ฒ„ํŠผ์€ ๋งŒ๋“ค์–ด๋‘์—ˆ์Šต๋‹ˆ๋‹ค! ์ง€๊ธˆ์€ ๋ฒ„ํŠผ ๋ณด์ผ ๊ฒ๋‹ˆ๋‹ค.
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
์˜ค.. ๋„ต ๋‹ค๋ฅธ ํŽ˜์ด์ง€๋„ ๋ฉ”์ธ์ด ๋˜๋Š” ํ…์ŠคํŠธ(๋ง›์ง‘ ์ด๋ฆ„, ๋‹จ์ฒด ์ด๋ฆ„)์€ `<h1 />`์„ ์‚ฌ์šฉํ•˜๋„๋ก ์ˆ˜์ •ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์ผ๋‹จ ๋ง›์ง‘ ์ƒ์„ธ ํŽ˜์ด์ง€์—์„œ๋Š” ๋ง›์ง‘ ์ด๋ฆ„์„ `<h1 />` ํƒœ๊ทธ๋กœ ์ˆ˜์ • ์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
className์„ ๋ชจ๋‘ kebab case๋กœ ์ˆ˜์ •์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,120 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Rating from "components/rating/Rating"; +import IconEditFilledWhite from "components/icons/IconEditFilledWhite"; +import Link from "next/link"; +import dayjs from "dayjs"; + +interface Pr...
Unknown
className์„ ๋ชจ๋‘ kebab case๋กœ ์ˆ˜์ •์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,120 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Rating from "components/rating/Rating"; +import IconEditFilledWhite from "components/icons/IconEditFilledWhite"; +import Link from "next/link"; +import dayjs from "dayjs"; + +interface Pr...
Unknown
์˜ค ๋„ต ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐฉ์‹์œผ๋กœ ์ˆ˜์ • ์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค!
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import styled from "@emotion/styled"; import { css, Theme } from "@emotion/react"; import CheckIcon from "components/inputs/TextInput/CheckIcon"; -import { TConditionCheck } from "./types/TConditionCheck"; +import { TConditionCheck } from "component...
Unknown
๋„ต ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
restaurantId๋ฅผ ๋ฐ›์•„์˜ฌ ๋•Œ `const restaurantId = query.restaurantId ?? 0;` ์ด๋ ‡๊ฒŒ๋งŒ ํ–ˆ๋”๋‹ˆ props๋กœ ๋„˜๊ฒจ์ค„ ๋•Œ ํƒ€์ž… ์—๋Ÿฌ๊ฐ€ ๋– ์„œ ์ €๋ ‡๊ฒŒ ์„ค์ •ํ•œ๊ฑด๋ฐ, ํ˜„์žฌ๋Š” `const restaurantId = (query.restaurantId ?? 0) as string;` ์•„์˜ˆ ์ด๋Ÿฐ ์‹์œผ๋กœ ํƒ€์ž…์„ ๋ช…์‹œํ•ด์ฃผ์–ด์„œ props๋กœ ๋ฐ›์•„์˜ฌ ๋•Œ์—๋„ string์œผ๋กœ๋งŒ ๋ฐ›์•„์˜ค๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,18 @@ +import styled from "@emotion/styled"; +import RestaurantsReviewForm from "feature/restaurants/restaurantsReview/components/form/RestaurantsReviewForm"; + +interface Props { + restaurantId: string; +} + +const ViewRestaurantReviewCreate: React.FC<Props> = ({ restaurantId }) => { + return ( + <Emot...
Unknown
[์—ฌ๊ธฐ](https://github.com/SystemConsultantGroup/foodhub-frontend/pull/27#discussion_r1373127345)์—์„œ ์ด์œ ๋ฅผ ์„ค๋ช…ํ•˜์˜€๊ณ , ํ•ด๋‹น ๋ถ€๋ถ„ string์œผ๋กœ๋งŒ ๋ฐ›์•„์˜ค๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,170 @@ +import styled from "@emotion/styled"; +import IconStarFilled from "components/rating/icons/IconStarFilled"; +import IconStarHalf from "components/rating/icons/IconStarHalf"; +import IconStarOutlined from "components/rating/icons/IconStarOutlined"; +import { HTMLAttributes, useEffect, useState, useRef...
Unknown
๋ณ„์ ์„ dragํ•˜์—ฌ ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ๋„๋ก ์ถ”๊ฐ€์ ์œผ๋กœ ๊ตฌํ˜„ํ•˜์˜€๋Š”๋ฐ, ๋ฐ์Šคํฌํ†ฑ์—์„œ๋Š” ์ž˜ ๋˜๋Š”๋ฐ ๋ชจ๋ฐ”์ผ์—์„œ๋Š” touchMove ์ด๋ฒคํŠธ๊ฐ€ ์ค‘๊ฐ„์— ๋Š๊ธฐ๋Š” ํ˜„์ƒ์ด ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ •ํ™•ํžˆ๋Š” touchMove ๋„์ค‘์— state๋ฅผ ์„ธํŒ…ํ•˜๋ฉด, ํ„ฐ์น˜๋Š” ์ด์–ด์ง€๊ณ  ์žˆ๋Š” ์ƒํ™ฉ์ธ๋ฐ๋„ touchMove๊ฐ€ ์ธ์‹๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. selectedValue๊ฐ€ ๋ฐ”๋€Œ๋ฉด์„œ star๋“ค์ด ๋‹ค์‹œ ๋ Œ๋”๋ง๋˜๋Š” ๊ฒƒ ๋•Œ๋ฌธ์ธ ๊ฒƒ ๊ฐ™์ง€๋งŒ ์ •ํ™•ํžˆ ๋ญ ๋•Œ๋ฌธ์ธ์ง€๋Š” ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ํ•ด๊ฒฐ ๋ฐฉ์•ˆ์„ ์ฐพ๋Š” ์ค‘์ด๊ธด ํ•œ๋ฐ, ํ•˜๋‹ค๊ฐ€ ์•ˆ๋˜๋ฉด ์ด์Šˆ๋กœ ์˜ฌ๋ฆฌ๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.. @jaychang99 @hoon5083
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
๋ฆฌ์•กํŠธ ๊ด€๋ จ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ import๊ฐ€ ๋” ์šฐ์„ ์ˆœ์œ„์— ์œ„์น˜ํ•ด์•ผ ํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
import './Login.scss'; ์œ„๋กœ ๊ฐ€์•ผ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!! ๐Ÿ˜Ž
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
์ˆ˜์ •์™„๋ฃŒ ๐Ÿ˜Š
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
- variable.scss ๋Š” scss ํŒŒ์ผ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์— js ์—์„œ import ๋ฅผ ํ•˜๋Š” ๊ฒƒ์ด ์˜๋ฏธ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. - scss ํŒŒ์ผ์—์„œ ๋ณ€์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์— import ํ•ด์ฃผ์„ธ์š”!
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
- ๋‘ ํ•จ์ˆ˜๋Š” ํ•˜๋Š” ์—ญํ• ์ด ๋น„์Šทํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ถฉ๋ถ„ํžˆ ํ•˜๋‚˜์˜ ํ•จ์ˆ˜๋กœ ํ•ฉ์ณ๋ณผ ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. - Refactoring CheckList ์ฐธ๊ณ ํ•ด์„œ ์ˆ˜์ •ํ•ด ๋ณด์„ธ์š”!
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
- isActive ๋Š” id ์™€ pw ๋กœ ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’์ด์ด๊ธฐ ๋•Œ๋ฌธ์— state ๋กœ ๊ด€๋ฆฌํ•  ํ•„์š”๊ฐ€ ์—†์–ด ๋ณด์ž…๋‹ˆ๋‹ค! - ์•„๋ž˜ ๊ณต์‹ ๋ฌธ์„œ ์ฐธ๊ณ ํ•˜์…”์„œ ์–ด๋–ค ๊ฐ’๋“ค์ด state ๋กœ ์ ์ ˆํ•˜์ง€ ์•Š์€์ง€ ํŒŒ์•…ํ•ด๋ณด์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค! https://www.notion.so/wecode/Westagram-React-Refactoring-Checklist-aea297cf88ed4601b769e4b2c2cfd4e1#089493d6bfca438aa328226e327cff92
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
- isActive ๋ฅผ state ๋กœ ๊ด€๋ฆฌํ•  ํ•„์š” ์—†์ด, ์—ฌ๊ธฐ์„œ ๋ฐ”๋กœ true / false ๋ฅผ ๊ณ„์‚ฐํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -1,3 +1,106 @@ -*{ - margin: 0; -} \ No newline at end of file +@import '../../../styles/variable.scss'; + +.Login { + @include flexCenter; + flex-direction: column; + align-items: center; + height: 100vh; + + .loginBox { + display: flex; + flex-direction: column; + justify-content: space-between; +...
Unknown
- css ์ž‘์—…์„ ํ•˜์‹ค๋•Œ ๋ฐ”๊นฅ ์š”์†Œ์— ํŠน์ •ํ•œ width / height ๊ฐ’์„ ๋ถ€์—ฌํ•˜์‹œ๋Š” ๊ฒƒ ๋ณด๋‹ค, ๋ฐ”๊นฅ ์š”์†Œ์˜ ํฌ๊ธฐ๋Š” ๋‚ด์šฉ๋ฌผ์˜ ํฌ๊ธฐ + margin / padding ๋“ค์˜ ํ•ฉ์œผ๋กœ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ํฌ๊ธฐ๊ฐ€ ๊ฒฐ์ •๋˜๋„๋ก ํ•˜์‹œ๋Š” ๊ฒŒ ๋” ์ข‹์Šต๋‹ˆ๋‹ค. - ํ•ญ์ƒ bottom up ๋ฐฉ์‹์œผ๋กœ ์Šคํƒ€์ผ๋ง ํ•˜๋Š” ์Šต๊ด€์„ ๋“ค์—ฌ์ฃผ์„ธ์š”!
@@ -0,0 +1,26 @@ +import React from 'react'; +import './Aside.scss'; + +import ProfileWrap from './ProfileWrap/ProfileWrap'; +import StoryBox from './StoryBox/StoryBox'; +import RecommendBox from './RecommendBox/RecommendBox'; +import WestaInfoBox from './WestaInfoBox/WestaInfoBox'; + +class Aside extends React.Compone...
JavaScript
- Import ์ˆœ์„œ ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”! ์ผ๋ฐ˜์ ์ธ convention์„ ๋”ฐ๋ฅด๋Š” ์ด์œ ๋„ ์žˆ์ง€๋งŒ ์ˆœ์„œ๋งŒ ์ž˜ ์ง€์ผœ์ฃผ์…”๋„ ๊ฐ€๋…์„ฑ์ด ์ข‹์•„์ง‘๋‹ˆ๋‹ค. ์•„๋ž˜ ์ˆœ์„œ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”. - React โ†’ Library(Package) โ†’ Component โ†’ ๋ณ€์ˆ˜ / ์ด๋ฏธ์ง€ โ†’ css ํŒŒ์ผ(scss ํŒŒ์ผ) ```suggestion import React from 'react'; import ProfileWrap from './ProfileWrap/ProfileWrap'; import StoryBox from './StoryBox/StoryBox'; import RecommendBox f...
@@ -0,0 +1,56 @@ +import React from 'react'; +import './Content.scss'; + +import Feed from './Feed/Feed'; +import Aside from './Aside/Aside'; + +class Content extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() { + fetch('http://local...
JavaScript
- `http://localhost:3000` ์€ ์ƒ๋žต ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ํฌํŠธ ๋ฒˆํ˜ธ๊ฐ€ ๋‹ฌ๋ผ์ง€๋ฉด(ex. `localhost:3001`) fetch ํ•จ์ˆ˜๋ฅผ ์ผ์ผ์ด ์ˆ˜์ •ํ•ด์ฃผ์–ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์œ ์ง€๋ณด์ˆ˜๊ฐ€ ์–ด๋ ค์›Œ์ง‘๋‹ˆ๋‹ค. ์•„๋ž˜ ์ฝ”๋“œ ์ฐธ๊ณ ํ•ด์„œ ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”! ```jsx const foo = () => { // fetch("http://localhost:3000/images/1") fetch("/images/1") } ``` - fetchํ•จ์ˆ˜์˜ `get method`๋Š” method์˜ default ๊ฐ’์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ƒ๋žต์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ```jsx const foo =...
@@ -0,0 +1,56 @@ +import React from 'react'; +import './Content.scss'; + +import Feed from './Feed/Feed'; +import Aside from './Aside/Aside'; + +class Content extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() { + fetch('http://local...
JavaScript
- mock up ๋ฐ์ดํ„ฐ์˜ ํ‚ค ๊ฐ’์€ ์Šค๋„ค์ดํฌ ์ผ€์ด์Šค๋กœ ์‚ฌ์šฉํ•ด์ฃผ์…”๋„ ๋˜์ง€๋งŒ (๋ฐฑ์—”๋“œ์—์„œ๋Š” ๋ณดํ†ต ์Šค๋„ค์ดํฌ ์ผ€์ด์Šค๋ฅผ ์“ฐ๊ธฐ ๋•Œ๋ฌธ์—) props ์˜ ์ด๋ฆ„์€ ์นด๋ฉœ ์ผ€์ด์Šค๋กœ ํ†ต์ผํ•ด ์ฃผ์„ธ์š”!
@@ -1,17 +1,38 @@ import { AccessTokenGuard } from '#guards/access-token.guard.js'; import { IReviewController } from '#reviews/interfaces/review.controller.interface.js'; -import { Body, Controller, Delete, Get, Param, Post, UseGuards } from '@nestjs/common'; +import { Body, Controller, Delete, Get, Param, Post, Que...
TypeScript
userId๋Š” ์•ก์„ธ์Šค ํ† ํฐ์—์„œ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์œผ๋‹ˆ ํŒŒ๋ผ๋ฏธํ„ฐ์—์„œ ๊ฐ€์ ธ์˜ฌ ํ•„์š”๋Š” ์—†์–ด๋ณด์—ฌ์š”!
@@ -1,17 +1,38 @@ import { AccessTokenGuard } from '#guards/access-token.guard.js'; import { IReviewController } from '#reviews/interfaces/review.controller.interface.js'; -import { Body, Controller, Delete, Get, Param, Post, UseGuards } from '@nestjs/common'; +import { Body, Controller, Delete, Get, Param, Post, Que...
TypeScript
๊ธฐ์‚ฌ ๋ฆฌ๋ทฐ ์กฐํšŒ๋Š” ๊ธฐ์‚ฌ ์ƒ์„ธ ์กฐํšŒ์—์„œ ํ•˜๊ฒŒ ๋  ๊ฒƒ์œผ๋กœ ๋ณด์ด๋Š”๋ฐ ๊ธฐ์‚ฌ ์ƒ์„ธ ์กฐํšŒ๋Š” ๋น„ํšŒ์›๋„ ์—ด๋žŒ ๊ฐ€๋Šฅํ•œ ํŽ˜์ด์ง€์ž…๋‹ˆ๋‹ค!
@@ -1,7 +1,7 @@ import { PrismaService } from '#global/prisma.service.js'; import { IReviewRepository } from '#reviews/interfaces/review.repository.interface.js'; import { ReviewInputDTO } from '#reviews/review.types.js'; -import { FindOptions } from '#types/options.type.js'; +import { FindOptions, SortOrder } from ...
TypeScript
repository์˜ ํ•œ ๋ฉ”์†Œ๋“œ๋Š” ํ•˜๋‚˜์˜ ๊ฒฐ๊ณผ๋งŒ์„ ๋‚ด๋ณด๋‚ด๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. count ๋ฉ”์†Œ๋“œ๋Š” findMany์™€ ๋”ฐ๋กœ ์ž‘์„ฑํ•˜๊ณ , service์—์„œ ๊ฒฐ๊ณผ๋ฅผ ํ•ฉ์ณ์„œ ๋‚ด๋ณด๋‚ด๋Š” ๊ฒƒ์ด ๋” ๋ฐ”๋žŒ์งํ•  ๊ฒƒ ๊ฐ™์•„์š”!
@@ -1,7 +1,7 @@ import { PrismaService } from '#global/prisma.service.js'; import { IReviewRepository } from '#reviews/interfaces/review.repository.interface.js'; import { ReviewInputDTO } from '#reviews/review.types.js'; -import { FindOptions } from '#types/options.type.js'; +import { FindOptions, SortOrder } from ...
TypeScript
์œ„์™€ ๋งˆ์ฐฌ๊ฐ€์ง€
@@ -0,0 +1,23 @@ +public class Calculator { + + public int add(int fir, int sec) { + return fir + sec; + } + + public int subtract(int fir, int sec) { + return fir - sec; + } + + public int multiply(int fir, int sec) { + return fir * sec; + } + + public int divide(int fir, int ...
Java
์˜ˆ์™ธ์ฒ˜๋ฆฌ ๐Ÿ‘
@@ -0,0 +1,40 @@ +public class StringCalculator { + + public int add(String string) { + if (string.isEmpty()) { + return 0; + } + + + String[] numbers = string.split(",|:"); + return sum(numbers); + } + + private int sum(String[] numbers) { + int total = 0; + + ...
Java
๋ณ€์ˆ˜๋ช…์„ string์œผ๋กœ ํ•˜๊ธฐ๋ณด๋‹ค๋Š” ์ข€ ๋” ๋‚˜์€ ๋ณ€์ˆ˜๋ช…์œผ๋กœ ์ง“๋Š” ๊ฒƒ์ด ๊ฐ€๋…์„ฑ ์ธก๋ฉด์—์„œ ์ข‹์•„๋ณด์—ฌ์š”!
@@ -0,0 +1,40 @@ +public class StringCalculator { + + public int add(String string) { + if (string.isEmpty()) { + return 0; + } + + + String[] numbers = string.split(",|:"); + return sum(numbers); + } + + private int sum(String[] numbers) { + int total = 0; + + ...
Java
4๋ฒˆ์งธ ์ค„์˜ ์ฝ”๋“œ์™€ ์ค‘๋ณต๋˜๋Š” ๋ถ€๋ถ„์œผ๋กœ ๋ณด์ด๋„ค์š”. ๋”ฐ๋กœ ๋ชจ๋“ˆํ™”ํ•ด์„œ ํ•จ์ˆ˜๋กœ ๋งŒ๋“ค์–ด์ฃผ๋ฉด ๊ฐ€๋…์„ฑ๋„ ์ข‹์•„์ง€๊ณ  ์žฌ์‚ฌ์šฉ์„ฑ๋„ ๋†’์•„์ ธ์š”.
@@ -0,0 +1,15 @@ +public class CalculatorTest { + + public static void main(String[] args) { + + Calculator calc = new Calculator(); + + System.out.println(calc.add(10, 20)); + System.out.println(calc.add(10, -5)); + System.out.println(calc.subtract(10, 20)); + System.out.println(c...
Java
ํ…Œ์ŠคํŠธ์ฝ”๋“œ๋กœ ์ž‘์„ฑ๋œ ๋ถ€๋ถ„์ด ์•„๋‹Œ ๊ฒƒ ๊ฐ™์•„์š”.
@@ -0,0 +1,46 @@ +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +public class StringCalculatorTest { + + private final StringCalculator calculator = new StringCalculator(); + + @Test + public void testEmptyString() { + assertEquals(0, calculator.add("")); + }...
Java
ํ•˜๋‚˜์˜ ํ…Œ์ŠคํŠธ๋Š” ํ•˜๋‚˜์— ๋Œ€ํ•ด์„œ๋งŒ ํ…Œ์ŠคํŠธํ•˜๋ฉด ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”.
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
๊ตฌ์กฐ๋ถ„ํ•ดํ• ๋‹น์„ ์ž˜ ์“ฐ์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
comment๊ด€๋ จ ํ•จ์ˆ˜๋ฅผ ๊น”๋”ํ•˜๊ฒŒ ์ž˜ ์ •๋ฆฌํ•˜์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
์ปค๋ฉ˜ํŠธ ์ปดํฌ๋„ŒํŠธ์— ํ”„๋กญ์Šค ์ „๋‹ฌ์„ ๊น”๋”ํ•˜๊ฒŒ ์ž˜ ํ•˜์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
์‚ผํ•ญ์—ฐ์‚ฐ์ž ์‚ฌ์šฉ์„ ์ž˜ ํ•˜์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
Lifecycle Method๋ฅผ ์ž˜ ์‚ฌ์šฉํ•˜์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
์ €๋„ ์ ์šฉํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค!๐Ÿ‘
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
๋ฒ„ํŠผ์ด ํ™œ์„ฑํ™”๋  ๋•Œ ์ƒ‰์ƒ ๋ณ€๊ฒฝ๊ณผ ๋น„ํ™œ์„ฑํ™” ๊ธฐ๋Šฅ๊นŒ์ง€ ๊ตฌํ˜„ํ•˜์‹  ์  ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค:)
@@ -0,0 +1,74 @@ +[ + { + "id": 1, + "userName": "bbangho", + "alt": "wecode", + "img": "/images/youngho/hanRiver.jpeg", + "comment": [ + { + "id": 1, + "userName": "bbangho", + "content": "ํ•œ๊ฐ• ๋‹ค๋…€๊ฐ~ โœŒ๏ธ", + "isLiked": true + }, + { + "id": 2, + "use...
Unknown
๋ชฉ๋ฐ์ดํ„ฐ ์‚ฌ์šฉ ๋„ˆ๋ฌด ์ข‹์Šต๋‹ˆ๋‹ค! :)
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
```suggestion <button onClick={this.handleLogin} className={condition ? 'buttonActivate' : 'buttonDisabled'} id="loginButton" disabled={ condition ? false : true} > ๋กœ๊ทธ์ธ </button> ``` ํ•ด๋‹น ์กฐ๊ฑด...
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
์ฐธ๊ณ ๋กœ ์œ„์˜ ๋ณ€์ˆ˜๋Š” render ํ•จ์ˆ˜ ๋‚ด์—์„œ ์„ ์–ธํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค!!
@@ -0,0 +1,78 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +body { + background-color: #fafafa; +} + +.container { + text-align: center; + width: 600px; + height: 600px; + margin: 50px auto 0 auto; + border: 1px solid #e6e6e6; + background-color: white; +} + +.header { + padding:...
Unknown
```suggestion body { background-color: #fafafa; } .container { text-align: center; border: 1px solid #e6e6e6; background-color: white; width: 600px; height: 600px; margin: 50px auto 0 auto; } .header { font-family: 'Lobster', cursive; font-size: 70px; font-weight: 1px; padding:...
@@ -0,0 +1,78 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +body { + background-color: #fafafa; +} + +.container { + text-align: center; + width: 600px; + height: 600px; + margin: 50px auto 0 auto; + border: 1px solid #e6e6e6; + background-color: white; +} + +.header { + padding:...
Unknown
์˜ํ˜ธ๋‹˜! ์ „์ฒด์ ์œผ๋กœ CSS ์†์„ฑ ์ˆœ์„œ ํ™•์ธํ•ด์„œ ์ ์šฉํ•ด์ฃผ์„ธ์š”~ - ํ•˜๋‚˜์˜ ์š”์†Œ์— ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์†์„ฑ์„ ๋ถ€์—ฌํ•˜๋Š” ๊ฒฝ์šฐ ์ค‘์š”๋„, ๊ด€๋ จ๋„์— ๋”ฐ๋ผ์„œ ๋‚˜๋ฆ„์˜ convention์„ ์ง€์ผœ์„œ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. - ์ผ๋ฐ˜์ ์ธ convention ์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์ด ์ˆœ์„œ ์ ์šฉํ•ด์ฃผ์„ธ์š”. [CSS property ์ˆœ์„œ] - Layout Properties (position, float, clear, display) - Box Model Properties (width, height, margin, padding) - Visual ...
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
import ์ˆœ์„œ๋Š” ์ž˜ ๋งž์ถฐ์ฃผ์…จ๊ณ , ํ•ด๋‹น ๋ถ€๋ถ„์—์„œ๋Š” ์ค„๋ฐ”๊ฟˆ ์—†์ด ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”~
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
fetchํ•จ์ˆ˜์˜ `get method๋Š” method์˜ default` ๊ฐ’์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ `์ƒ๋žต์ด ๊ฐ€๋Šฅ`ํ•ฉ๋‹ˆ๋‹ค. ๊ณ ๋กœ get method ์š”์ฒญ์‹œ์—๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ๋‘๋ฒˆ์งธ ์ธ์ž๊ฐ€ ์ƒ๋žต ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ```jsx const foo = () => { fetch(`${cartAPI}/quantity`) .then((res) => res.json()) ```
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
story ๋ถ€๋ถ„์ด ์—ฌ๋Ÿฌ๋ฒˆ ๋ฐ˜๋ณต๋˜๊ณ  ์žˆ๋„ค์š”! ์ƒ์ˆ˜ ๋ฐ์ดํ„ฐ์™€ map์„ ์‚ฌ์šฉํ•ด์„œ ์ค‘๋ณต๋œ ๋ถ€๋ถ„์„ ์ค„์—ฌ์ฃผ์„ธ์š”! ``` const STORIES = [ {img: "//", name: "wecorder1"}, {img: "//", name: "wecorder2"}, {img: "//", name: "wecorder3"} ]; STORIES.map(); ```
@@ -0,0 +1,285 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +@media screen and (max-width: 1200px) { + .mainRight { + display: none; + } + + .article { + width: 100%; + } +} + +body { + margin: 0; + padding: 0; + border-collapse: collapse; +} + +article { + width: 800px; + ...
Unknown
๋ฐ˜์‘ํ˜• ์•„์ฃผ ์ข‹๋„ค์š”!! ๋ธŒ๋ ˆ์ดํฌ ํฌ์ธํŠธ๋Š” ๊ธฐํš๋งˆ๋‹ค ๋‹ฌ๋ผ์ง€์ง€๋งŒ ๋ณดํ†ต ํƒœ๋ธ”๋ฆฟ๊ณผ ๋ฐ์Šคํฌํƒ‘์˜ ๊ตฌ๋ถ„์ ์€ 1078px์ด๋ผ๋Š” ์  ์•Œ์•„๋‘์„ธ์š”! ๋ชจ๋ฐ”์ผ๊ณผ ํƒœ๋ธ”๋ฆฟ์€ 768px์ž…๋‹ˆ๋‹ค!
@@ -0,0 +1,285 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +@media screen and (max-width: 1200px) { + .mainRight { + display: none; + } + + .article { + width: 100%; + } +} + +body { + margin: 0; + padding: 0; + border-collapse: collapse; +} + +article { + width: 800px; + ...
Unknown
๊ฐ™์€ ์Šคํƒ€์ผ์˜ ๊ฒฝ์šฐ์—๋Š” ์ค‘๋ณตํ•˜์—ฌ ์ฃผ์‹œ์ง€ ๋ง๊ณ  ๊ฐ™์€ ํด๋ž˜์Šค๋ช…์„ ์‚ฌ์šฉํ•˜์…”๋„ ๋ฉ๋‹ˆ๋‹ค!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
import ๊ตฌ๋ถ„์€ ๋„ˆ๋ฌด ์ข‹์ง€๋งŒ ์ค„๋ฐ”๊ฟˆ์€ ์•ˆํ•˜์…”๋„ ๋ฉ๋‹ˆ๋‹ค!!!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
์ด๋ ‡๊ฒŒ ๊ตฌ์กฐ๋ถ„ํ•ดํ• ๋‹น ๋„ˆ๋ฌด ์ข‹๋„ค์š”!!
@@ -0,0 +1,74 @@ +[ + { + "id": 1, + "userName": "bbangho", + "alt": "wecode", + "img": "/images/youngho/hanRiver.jpeg", + "comment": [ + { + "id": 1, + "userName": "bbangho", + "content": "ํ•œ๊ฐ• ๋‹ค๋…€๊ฐ~ โœŒ๏ธ", + "isLiked": true + }, + { + "id": 2, + "use...
Unknown
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,78 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +body { + background-color: #fafafa; +} + +.container { + text-align: center; + width: 600px; + height: 600px; + margin: 50px auto 0 auto; + border: 1px solid #e6e6e6; + background-color: white; +} + +.header { + padding:...
Unknown
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,78 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +body { + background-color: #fafafa; +} + +.container { + text-align: center; + width: 600px; + height: 600px; + margin: 50px auto 0 auto; + border: 1px solid #e6e6e6; + background-color: white; +} + +.header { + padding:...
Unknown
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,285 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +@media screen and (max-width: 1200px) { + .mainRight { + display: none; + } + + .article { + width: 100%; + } +} + +body { + margin: 0; + padding: 0; + border-collapse: collapse; +} + +article { + width: 800px; + ...
Unknown
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!
@@ -0,0 +1,285 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +@media screen and (max-width: 1200px) { + .mainRight { + display: none; + } + + .article { + width: 100%; + } +} + +body { + margin: 0; + padding: 0; + border-collapse: collapse; +} + +article { + width: 800px; + ...
Unknown
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ๐ŸŒ