code
stringlengths
41
34.3k
lang
stringclasses
8 values
review
stringlengths
1
4.74k
@@ -1,14 +1,148 @@ -// 필수 import React from 'react'; +import { Link } from 'react-router-dom'; -// 컴포넌트 import Nav from '../../../components/Nav/Nav'; +import Feed from '../Main/Feed/Feed'; +import OtherUserPro from './OtherUserPro/OtherUserPro'; +import FootLists from '../Main/Feed/FootLists/FootLists'; + +import ...
JavaScript
데이터 확인 다 하셨나요~~?
@@ -1,14 +1,148 @@ -// 필수 import React from 'react'; +import { Link } from 'react-router-dom'; -// 컴포넌트 import Nav from '../../../components/Nav/Nav'; +import Feed from '../Main/Feed/Feed'; +import OtherUserPro from './OtherUserPro/OtherUserPro'; +import FootLists from '../Main/Feed/FootLists/FootLists'; + +import ...
JavaScript
피어 리뷰 중 Return의 비밀을? 감사합니다.
@@ -1,8 +1,79 @@ import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = event => { + const { name, value } = ev...
JavaScript
Boolean 데이터 타입 적용시켜보았아요. 잘 세웠던 코드가 작동되지 않을까 시도하기 어려웠는데 격려 감사합니당~
@@ -0,0 +1,61 @@ +.Login { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + + main { + display: flex; + flex-direction: column; + justify-content: space-around; + width: 350px; + height: 380px; + padding: 40px; + border: 1px solid #ccc; + + header { + ...
Unknown
기존 html 코드를 옮기다 보니 발생한 문제였어요 :) 해결되었답니당 !!
@@ -0,0 +1,134 @@ +[ + { + "id": 1, + "userName": "eessoo__", + "src": "../images/soojeongLee/user2.jpg", + "feedText": "💟", + "commentData": [ + { + "id": 1, + "userName": "wecode", + "content": "Welcome to world best coding bootcamp!", + "commnetLike": false + },...
Unknown
fetching 을 연습해보려고 만들어보았어요
@@ -0,0 +1,175 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import Comment from './Comment/Comment'; + +import '../Feed/Feed.scss'; + +export class Feed extends Component { + constructor() { + super(); + this.state = { + comment: '', + // commentList: [], +...
JavaScript
인스타그램에서 실제 좋아요를 좋아한 숫자에 접근하게 되면 누가 좋아요를 눌렀는지 목록을 볼 수 있어서, 추후에 기능을 넣게 된다면 button을 넣어야 하지 않을까 생각이 들어서 넣어봤습니다.
@@ -0,0 +1,23 @@ +//라이브러리 +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +//컴포넌트 +import { FOOTLIST } from '../FootLists/footData'; + +// css +import './FootLists.scss'; + +export class FootLists extends Component { + render() { + return FOOTLIST.map(footlists => { + ret...
JavaScript
꼭 풋 리스트를... 컴포넌트화해보겠어요...!!!!
@@ -1,14 +1,148 @@ -// 필수 import React from 'react'; +import { Link } from 'react-router-dom'; -// 컴포넌트 import Nav from '../../../components/Nav/Nav'; +import Feed from '../Main/Feed/Feed'; +import OtherUserPro from './OtherUserPro/OtherUserPro'; +import FootLists from '../Main/Feed/FootLists/FootLists'; + +import ...
JavaScript
네..! 무엇이 어디에 전달되었는지 확인하기가 어려워서 넣어뒀어요 ...!
@@ -1,14 +1,148 @@ -// 필수 import React from 'react'; +import { Link } from 'react-router-dom'; -// 컴포넌트 import Nav from '../../../components/Nav/Nav'; +import Feed from '../Main/Feed/Feed'; +import OtherUserPro from './OtherUserPro/OtherUserPro'; +import FootLists from '../Main/Feed/FootLists/FootLists'; + +import ...
JavaScript
ㅎㅎㅎ Return 은 생략될 수 있다 ~
@@ -1,8 +1,79 @@ import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = event => { + const { name, value } = ev...
JavaScript
계산된속성명 굿
@@ -0,0 +1,175 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import Comment from './Comment/Comment'; + +import '../Feed/Feed.scss'; + +export class Feed extends Component { + constructor() { + super(); + this.state = { + comment: '', + // commentList: [], +...
JavaScript
오....
@@ -0,0 +1,175 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import Comment from './Comment/Comment'; + +import '../Feed/Feed.scss'; + +export class Feed extends Component { + constructor() { + super(); + this.state = { + comment: '', + // commentList: [], +...
JavaScript
이런방법이.. 피드마다 댓글 데이터를 스테이트로 포함하게 해주니 보기 쉽고 좋네요
@@ -1,8 +1,79 @@ import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = event => { + const { name, value } = ev...
JavaScript
이런 주석들은 불필요하니까 삭제해주시는게 좋아보입니다!
@@ -1,8 +1,79 @@ import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = event => { + const { name, value } = ev...
JavaScript
event.target 반복되고 있는데 구조분해해서 활용해볼 수 있겠네요! ```const {name,value} = event.target;```
@@ -12,9 +12,7 @@ import com.doubleowner.revibe.domain.user.entity.User; import com.doubleowner.revibe.global.config.auth.UserDetailsImpl; import com.doubleowner.revibe.global.exception.ImageException; -import com.doubleowner.revibe.global.exception.ReviewException; import com.doubleowner.revibe.global.exception.er...
Java
_:hammer_and_wrench: Refactor suggestion_ **RuntimeException 대신 맞춤형 예외를 사용해주세요** 일반적인 `RuntimeException` 대신 도메인에 맞는 맞춤형 예외 클래스를 생성하여 사용하는 것이 좋습니다. 이렇게 하면 예외 처리 시 더 구체적인 정보를 제공하고, 예외를 효과적으로 관리할 수 있습니다. 예를 들어, `PaymentNotFoundException`을 생성하여 사용할 수 있습니다: ```java public class PaymentNotFoundException extends Runtime...
@@ -12,9 +12,7 @@ import com.doubleowner.revibe.domain.user.entity.User; import com.doubleowner.revibe.global.config.auth.UserDetailsImpl; import com.doubleowner.revibe.global.exception.ImageException; -import com.doubleowner.revibe.global.exception.ReviewException; import com.doubleowner.revibe.global.exception.er...
Java
_:hammer_and_wrench: Refactor suggestion_ **RuntimeException 대신 맞춤형 예외를 사용해주세요** `Execution` 객체를 찾을 수 없을 때 `RuntimeException`을 발생시키고 있습니다. 도메인에 맞는 맞춤형 예외를 생성하여 예외 처리를 개선할 수 있습니다. 예를 들어, `ExecutionNotFoundException`을 생성하여 사용할 수 있습니다: ```java public class ExecutionNotFoundException extends RuntimeException { pu...
@@ -12,9 +12,7 @@ import com.doubleowner.revibe.domain.user.entity.User; import com.doubleowner.revibe.global.config.auth.UserDetailsImpl; import com.doubleowner.revibe.global.exception.ImageException; -import com.doubleowner.revibe.global.exception.ReviewException; import com.doubleowner.revibe.global.exception.er...
Java
_:warning: Potential issue_ **예외 처리가 필요합니다** `findMyReview` 메서드를 호출한 후, 리뷰가 존재하지 않을 경우에 대한 예외 처리가 없습니다. 리뷰를 찾을 수 없는 경우를 대비하여 예외 처리를 추가하는 것이 좋습니다. 아래와 같이 수정할 수 있습니다: ```diff -Review review = reviewRepository.findMyReview(id, userDetails.getUser().getId()); +Review review = reviewRepository.findMyReview(id, userDet...
@@ -12,9 +12,7 @@ import com.doubleowner.revibe.domain.user.entity.User; import com.doubleowner.revibe.global.config.auth.UserDetailsImpl; import com.doubleowner.revibe.global.exception.ImageException; -import com.doubleowner.revibe.global.exception.ReviewException; import com.doubleowner.revibe.global.exception.er...
Java
_:warning: Potential issue_ **예외 처리가 필요합니다** `deleteReview` 메서드에서도 리뷰를 찾지 못할 경우를 대비한 예외 처리가 필요합니다. 아래와 같이 수정할 수 있습니다: ```diff -Review review = reviewRepository.findMyReview(id, user.getId()); +Review review = reviewRepository.findMyReview(id, user.getId()) + .orElseThrow(() -> new ReviewNotFoundException("리뷰를 ...
@@ -12,9 +12,7 @@ import com.doubleowner.revibe.domain.user.entity.User; import com.doubleowner.revibe.global.config.auth.UserDetailsImpl; import com.doubleowner.revibe.global.exception.ImageException; -import com.doubleowner.revibe.global.exception.ReviewException; import com.doubleowner.revibe.global.exception.er...
Java
_:warning: Potential issue_ **RuntimeException에 의미 있는 메시지를 추가해주세요** `orElseThrow`에서 예외를 발생시킬 때, 현재 메시지가 없는 `RuntimeException`을 사용하고 있습니다. 명확한 예외 메시지를 포함하여 문제의 원인을 전달하는 것이 좋습니다. 아래와 같이 수정할 수 있습니다: ```diff -Payment payment = paymentRepository.findByPaymentId(reviewRequestDto.getPaymentId()).orElseThrow(() -> new Ru...
@@ -6,6 +6,7 @@ import com.doubleowner.revibe.domain.review.service.ReviewService; import com.doubleowner.revibe.global.common.dto.CommonResponseBody; import com.doubleowner.revibe.global.config.auth.UserDetailsImpl; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframewor...
Java
_:bulb: Codebase verification_ **파일 업로드 보안 검증이 미흡합니다** 현재 파일 크기 제한(5MB)만 설정되어 있으며, 다음과 같은 중요한 보안 검증이 누락되어 있습니다: 1. 이미지 파일 형식 검증 로직 (허용된 확장자: jpg, png 등) 2. Content-Type 검증 (`image/*`) 3. 파일명 보안 처리 (XSS 방지를 위한 특수문자 제거 등) 구현 제안: - `FileValidator` 클래스를 생성하여 위 검증 로직을 구현하고 `ReviewService`에서 활용 - 파일 업로드 전 `MediaType.I...
@@ -0,0 +1,45 @@ +package com.example.momogum.repository.redisRepository; + +import lombok.RequiredArgsConstructor; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Repository; + +import java.time.Duration; +import java.util.Objects; +import java.util.Set; +import java.u...
Java
redis template를 이해하고 사용하신 것 같네요 확실히 이해만 잘 할 수 있다면 crudRepository보다 template구현하는게 의도를 더 잘 담을 수 있어서 좋은 것 같습니다. 고생하셨어요!
@@ -1,20 +1,59 @@ package com.example.momogum.config; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.sp...
Java
이렇게 중복되는 설정부분을 따로 클래스로 분리하면 가독성이 좋을 것 같습니다! ex) `private void setSerialzer { redisTemplate.setKeySerializer(new StringRedisSerializer()); redisTemplate.setHashKeySerializer(new StringRedisSerializer()); redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer()); ...
@@ -2,11 +2,24 @@ import com.example.momogum.domain.MealDiary; import com.example.momogum.domain.UserEntity; +import com.example.momogum.domain.common.enums.IsRevisit; +import io.lettuce.core.dynamic.annotation.Param; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jp...
Java
동적 쿼리가 많은 경우 queryDsl도 괜찮아보입니다. 여견상 도입할 수 있으면 하면 좋을 것 같습니다!
@@ -0,0 +1,45 @@ +package com.example.momogum.repository.redisRepository; + +import lombok.RequiredArgsConstructor; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Repository; + +import java.time.Duration; +import java.util.Objects; +import java.util.Set; +import java.u...
Java
`redisTemplate.opsForSet().members(key)` 이부분에서 NullPointerException이 발생할 수도 있다고 생각하는데.. .. 잘 모르지만 어떻게 생각하시는지 궁금합니다
@@ -0,0 +1,111 @@ +package com.example.momogum.service.viewMealDiaryService; + +import com.example.momogum.domain.MealDiary; +import com.example.momogum.domain.MealDiaryImage; + +import com.example.momogum.domain.common.enums.IsRevisit; +import com.example.momogum.repository.mealDiaryRepo.MealDiaryRepository; +import c...
Java
이 부분에서 id 반환/ dto 변환, redis ttl 설정 이런식으로 있는 것 같아서 클래스 3개로 쪼개면 좋을 것 같습니다 SRP
@@ -0,0 +1,45 @@ +package com.example.momogum.repository.redisRepository; + +import lombok.RequiredArgsConstructor; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Repository; + +import java.time.Duration; +import java.util.Objects; +import java.util.Set; +import java.u...
Java
감사합니다 !
@@ -1,20 +1,59 @@ package com.example.momogum.config; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.sp...
Java
가독성 뿐만 아니라 유지보수에서도 이점이 있을것 같습니다 ! 직렬화가 필요해서 급하게 추가하다 보니 시야가 좁아졌던것 같습니다 충고 감사합니다 !
@@ -2,11 +2,24 @@ import com.example.momogum.domain.MealDiary; import com.example.momogum.domain.UserEntity; +import com.example.momogum.domain.common.enums.IsRevisit; +import io.lettuce.core.dynamic.annotation.Param; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jp...
Java
queryDSL을 고려를 했었는데 아무래도 조금은 후순위가 될 듯합니다 ㅜㅜ
@@ -0,0 +1,45 @@ +package com.example.momogum.repository.redisRepository; + +import lombok.RequiredArgsConstructor; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Repository; + +import java.time.Duration; +import java.util.Objects; +import java.util.Set; +import java.u...
Java
현재 검증이나 @annotation 부분에 대해서는 추가적인 mealdiary 수정 사항 반영해서 진행할려고 계획중입니다. 조금씩 변동사항이 있어 추후 한번에 검증 단계에 필요한 부분을 모아둘려고 하고 있습니다 !
@@ -0,0 +1,111 @@ +package com.example.momogum.service.viewMealDiaryService; + +import com.example.momogum.domain.MealDiary; +import com.example.momogum.domain.MealDiaryImage; + +import com.example.momogum.domain.common.enums.IsRevisit; +import com.example.momogum.repository.mealDiaryRepo.MealDiaryRepository; +import c...
Java
다시 읽어 보니 너무 밀집되어 있는 것 같네요 ,, 추후 2차 설계 때 이 부분 꼭 인지해서 리팩터링 진행해보겠습니다 !
@@ -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
멘토 리뷰 반영 완료(?)
@@ -1,18 +1,21 @@ -package com.antique.service; +package com.antique.service.review; import com.antique.domain.Product; import com.antique.domain.Review; -import com.antique.domain.User; import com.antique.dto.review.ReviewRequestDTO; +import com.antique.domain.User; import com.antique.dto.user.GetUserReviewDTO; ...
Java
수정 및 삭제 메소드에 안전한 데이터베이스 작업을 위해서 @Transactional 어노테이션을 붙이면 좋을 것 같아~~ 참고자료 https://velog.io/@zedy_dev/Transactional-%EC%96%B4%EB%85%B8%ED%85%8C%EC%9D%B4%EC%85%98%EC%9D%84-%ED%86%B5%ED%95%9C-%ED%8A%B8%EB%9E%9C%EC%9E%AD%EC%85%98-%EA%B4%80%EB%A6%AC-%EB%9E%80-%ED%99%9C%EC%9A%A9%EB%B0%A9%EB%B2%95-%EB%82%B4-%EA%B2%BD%ED%97...
@@ -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,3 +1,5 @@ -import date from './date.svg'; -export * from './Eyes'; +import date from "./date.svg"; +export * from "./Eyes"; export { date }; +import Logo from "./Logo.svg"; +export { Logo };
TypeScript
svg는 import logo from './logo.svg'; export {logo}; 이런 식으로 해주어야할텐데 지금 정상 작동하시나요? 그리고 이미지는 소문자로 네이밍하는 것이 좋습니다.
@@ -0,0 +1,65 @@ +import styled from "styled-components"; +import { Logo } from "../../assets"; +import { useState } from "react"; +import { LoginBtn } from "../header/LoginBtn"; +import { font } from "../../theme"; + +export const Header = () => { + const [isLogined, setIsLogined] = useState<boolean>(false); + + ret...
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
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()) ```