code
stringlengths
41
34.3k
lang
stringclasses
8 values
review
stringlengths
1
4.74k
@@ -0,0 +1,43 @@ +import java.util.ArrayList; +import java.util.List; + +public class LottoTicket { + private Money ticketPrice; + private Lottos autoLottos; + private Lottos manualLottos; + + public LottoTicket(Money ticketPrice, Lottos autoLottos, Lottos manualLottos) { + this.ticketPrice = ticketP...
Java
여기도 행위가 없고 데이터 + getter 뿐이네요. 그런데 이렇게 클래스를 나눠보려고 최대한 시도하신 점 👍
@@ -0,0 +1,35 @@ +import java.util.List; + +public class LottoUser { + private Money investMoney; + private int countOfManualLotto; + private List<List<LottoNo>> numbersOfManualLottos; + + private LottoTicket lottoTicket; + + public LottoUser(Money investMoney, int countOfManualLotto, List<List<LottoNo>>...
Java
여기도 setter getter 뿐 이네요 ㅠ
@@ -0,0 +1,65 @@ +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class LottoPurchaseService { + public final static Money LOTTO_PRICE = Money.valueOf(1000); + + public static Money validatePurchase(Money inputMoney, int countOfManualLotto) throws OutOfConditionE...
Java
데이터와 프로세스가 따로 있는 것 == 절차지향 프로그래밍 현 상황 : 데이터 = LottoSeller, Ticket, User 등 (데이터 + getter) 프로세스 = Service (데이터 get 해서 로직 처리) 답 : MVC와 layered architecture를 잊고 view 와 비즈니스 로직을 분리하는 것만 기억하고 짜보기
@@ -0,0 +1,65 @@ +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Scanner; +import java.util.stream.Collectors; + +public final class InputView { + + public static Money scanMoney(Scanner scanner) { + System.out.println("\n구입금액을 입력해 주세요."); + + return Mon...
Java
view 에서는 데이터를 scan 해오는 책임만 있습니다. 지금은 변환 로직까지 여기서 처리하고 있네요~!
@@ -0,0 +1,29 @@ +public final class PurchaseResultView { + public void notifyIfChangeLeft(LottoSeller seller) { + if (!seller.getChange().equals(Money.ZERO)) { + System.out.println("잔돈 " + seller.getChange() + "원이 남았습니다."); + System.out.println(); + } + } + + public void pr...
Java
finall class 로 하신 이유가 궁금합니다~
@@ -0,0 +1,77 @@ +import React, { useState } from "react"; +import styled from "styled-components"; +import { Star as StarIcon } from "lucide-react"; + +interface StarRatingProps { + totalStars?: number; + initialRating?: number; + onRatingChange?: (rating: number) => void; +} + +const BackgroundContainer = styled.d...
Unknown
filled 안쪽에 String으로 감싸주세요
@@ -0,0 +1,77 @@ +import React, { useState } from "react"; +import styled from "styled-components"; +import { Star as StarIcon } from "lucide-react"; + +interface StarRatingProps { + totalStars?: number; + initialRating?: number; + onRatingChange?: (rating: number) => void; +} + +const BackgroundContainer = styled.d...
Unknown
제가 후기 페이지 만들면서 이 부분 수정해서 한꺼번에 PR 올리겠습니다
@@ -0,0 +1,91 @@ +package christmas.Controller; + +import christmas.Domain.EventBenefitSettler; +import christmas.Domain.EventPlanner; +import christmas.Event.EventBadge; +import christmas.View.InputView; +import christmas.View.OutputView; +import java.util.Map; + +public class EventController { + public EventPlanne...
Java
```suggestion public void takeVisitDate() { try { String visitDate = InputView.readVisitDate(); eventBenefitSettler = new EventBenefitSettler(visitDate); } catch (IllegalArgumentException e) { OutputView.printException(e); takeVisitDate(); ...
@@ -0,0 +1,92 @@ +package christmas.Util; + +import static christmas.Event.EventOption.EVENT_END_DATE; +import static christmas.Event.EventOption.EVENT_START_DATE; +import static christmas.Event.EventOption.MAX_ORDER_QUANTITY; +import static christmas.Message.OutputMessage.NOT_A_VALID_DATE; + +import christmas.Domain.M...
Java
정규표현식을 정말 잘 활용하시는군요!👍👍 그런데 `(?:,|$)` 는 어떤 역할을 하는지 궁금합니다!
@@ -0,0 +1,92 @@ +package christmas.Util; + +import static christmas.Event.EventOption.EVENT_END_DATE; +import static christmas.Event.EventOption.EVENT_START_DATE; +import static christmas.Event.EventOption.MAX_ORDER_QUANTITY; +import static christmas.Message.OutputMessage.NOT_A_VALID_DATE; + +import christmas.Domain.M...
Java
`isDrinkMenu` 는 `MenuBoard` 에게 넘겨주면 어떨까요?? 음료를 확인하는 책임은 `MenuBoard` 가 가지고 있는게 더 어울릴 것 같아요! 😁
@@ -0,0 +1,92 @@ +package christmas.Util; + +import static christmas.Event.EventOption.EVENT_END_DATE; +import static christmas.Event.EventOption.EVENT_START_DATE; +import static christmas.Event.EventOption.MAX_ORDER_QUANTITY; +import static christmas.Message.OutputMessage.NOT_A_VALID_DATE; + +import christmas.Domain.M...
Java
해당 정규표현식이 반복되는 것 같아요! 그렇다면 Pattern 객체를 캐싱해주면 어떨까요?? 디스코드 함께 나누기에 현지님이[ 공유하신 글](https://velog.io/@dlguswl936/%EA%B3%B5%EB%B6%80%ED%95%9C-%EA%B2%83-String.matches%EB%8A%94-%EC%99%9C-%EC%84%B1%EB%8A%A5%EC%97%90-%EC%95%88-%EC%A2%8B%EC%9D%84%EA%B9%8C#%EA%B2%B0%EB%A1%A0-pattern-%EA%B0%9D%EC%B2%B4%EB%A5%BC-%EC%BA%90%EC%8B%B1...
@@ -0,0 +1,30 @@ +package christmas.Util; + +public class CommaFormatter { + public static String formatWithComma(int number) { + String numberStr = Integer.toString(number); + int length = numberStr.length(); + + if (length <= 3) { + return numberStr; + } + String resul...
Java
콤마를 위해 전용 객체를 만들어주셨군요! 직접 만들어주는 것도 좋네요! 그런데 돈 단위를 위한 콤마를 넣어주는 기능을 자바에서 제공하고 있답니다! ㅎㅎ DecimalFormat 에 대해서 알아보시면 좋을 것 같아요! 제가 [참고했던 글](https://jamesdreaming.tistory.com/203)을 공유합니다!
@@ -0,0 +1,67 @@ +package christmas.Domain; + +import christmas.Util.OrderMenuValidator; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class EventPlanner { + private final List<Menu> o...
Java
```suggestion public Map<String, Integer> calculateCategoryCount() { Map<String, Integer> categoryCount = new HashMap<>(); int count = 0; for (Menu menu : orderMenu) { String menuCategory = menu.getMenuCategory(); categoryCount.put(menuCategory, categoryCount.ge...
@@ -0,0 +1,102 @@ +package christmas.Domain; + +import christmas.Event.EventBenefit; +import christmas.Event.EventOption; +import christmas.Event.SpecialDiscountDay; +import christmas.Util.OrderMenuValidator; +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.util.HashMap; +import java.util.Map; + +...
Java
`LocalDate` 를 활용하면 요일을 파악할 수 있군요! 배워갑니다! 😁
@@ -1,23 +1,20 @@ <template> - <button - @click=" - () => { - if (!props.disabled) props.onClick(); - } - " - :class="getNextButtonStyle()" - > - <slot></slot> + <button @click="handleNextButtonClick" :class="getNextButtonStyle()"> + <slot /> </button> </template> <script setu...
Unknown
단순 궁금증으로 질문드립니다. undefined를 타입으로 지정하신 이유가 있을까요? NextButton.vue의 부모 컴포넌트에서 isPrimary 값을 부여하지 않을 때가 있어 undefined를 포함한 것으로 보이는데, 이 경우는 ? 만으로도 충분히 표현이 된 것 같습니다. 특히 boolean이기때문에 undefined일 때 falsy하게 인식이 될 것 같은데 추가하신 이유가 궁금합니다~
@@ -3,8 +3,8 @@ <p class="text-medium font-semi_bold">{{ title }}</p> <div class="flex gap-x-3"> <button - v-for="size in sizes" - :key="size.id" + v-for="(size, index) in sizes" + :key="getButtonKey(size, index)" class="flex flex-col items-center justify-between ga...
Unknown
storeToRefs 를 사용해서 반응성을 살리셨네요 👍
@@ -3,16 +3,12 @@ <section class="mx-auto flex h-full flex-col items-center justify-between bg-gray_00-light text-gray_05-light dark:bg-gray_00-dark dark:text-gray_05-dark sm:w-screen md:w-96" > - <ProgressNavBar prevPage="/size" pageName="ingredient" /> - <div v-if="isLoading">로딩중입니다.</div> ...
Unknown
서버 상태관리와 클라이언트 상태관리를 분리하여 관리하셨군요 👍
@@ -1,23 +1,20 @@ <template> - <button - @click=" - () => { - if (!props.disabled) props.onClick(); - } - " - :class="getNextButtonStyle()" - > - <slot></slot> + <button @click="handleNextButtonClick" :class="getNextButtonStyle()"> + <slot /> </button> </template> <script setu...
Unknown
사실 저도 추가하지 않았다가, 좀더 가시적으로 표현하려고 작성을 했어요! 음, 메이브님 말씀듣고 다시 생각해보니 가시성만으로 추가하는 건 좀 의미가 없는 것 같긴하네요!!
@@ -3,20 +3,18 @@ class="text-gray_05-light dark:text-gray_05-dark w-6 h-6" @click="goBack" > - <slot></slot> + <slot /> </button> </template> <script setup lang="ts"> -import { useRouter } from 'vue-router'; +import { pushPage } from '@router/route.helper'; const props = defineProps<{ p...
Unknown
화살표 함수로 해주세요~
@@ -0,0 +1,19 @@ +package nextstep.security.authentication; + +import nextstep.security.role.GrantedAuthority; + +import java.util.List; + +public interface Authentication { + String getPrincipal(); + + String getCredentials(); + + boolean isAuthenticated(); + + List<GrantedAuthority> getAuthorities(); + + ...
Java
app 패키지는 일반적으로 구현하는 애플리케이션이고, security 패키지는 프레임워크의 설계를 가지게 되는데요. 그런 관점에서 지금의 Role은 NORMAL, ADMIN만 지원하고 있는데, 프레임워크를 사용하는 입장에서는 두 타입 이외에 많은 케이스가 존재할 것 같아요. 프레임워크라는 관점에서 어떻게 확장 포인트를 가져갈 수 있을까요?
@@ -0,0 +1,86 @@ +package nextstep.app; + +import nextstep.app.domain.CustomUserDetailsService; +import nextstep.app.domain.MemberRepository; +import nextstep.security.role.Role; +import nextstep.security.core.context.HttpSessionSecurityContextRepository; +import nextstep.security.core.context.SecurityContextRepository...
Java
> DefaultSecurityFilterChain의 match 기준이 뭘까요? 여러 필터 체인이 존재할 수 있고, 필터 체인마다 조건을 설정할 수 있습니다. 예를 들어 AuthorizationFilter의 "/members"가 일치하는지의 조건도 DefaultSecurityFilterChain의 match로 옮기는 것도 하나의 예시가 될 수 있을 것 같은데요. 이번 미션에서 중요한 포인트는 아니기도 하고 지금 구현하는 규모에선 Filter에서 검증하는 것과 차이를 느끼지 힘들 수 있을 것 같아서 4주 차 리팩터링 때 자세히 구현해보면 좋을 것 같습니다 ㅎㅎ ...
@@ -0,0 +1,30 @@ +package nextstep.app.domain; + +import nextstep.security.core.uesrdetails.UserDetails; +import nextstep.security.core.uesrdetails.UserDetailsService; +import nextstep.security.exception.AuthenticationException; +import nextstep.security.role.Role; + +public class CustomUserDetailsService implements Us...
Java
```suggestion return memberRepository.findByEmail(username) .map(CustomMember::new) .orElseThrow(() -> new IllegalArgumentException("해당하는 사용자를 찾을 수 없습니다.")); ``` 소소한 가독성 상승을 해볼 수 있겠네요~
@@ -0,0 +1,81 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
SecurityContextRepository의 구현체를 Filter에서 주입받아 처리하게 구현해주셨네요! 스프링은 다른 Filter에서 SecurityContextRepository의 내부 구현을 몰라도 `SecurityContextHolder.getContext()`를 통해 인증 정보를 활용할 수 있도록 설계되어 있는데요. 이렇게 구조를 설계한 이유에 대해 고민해보시면 좋겠습니다!
@@ -0,0 +1,48 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.core....
Java
일반적으로 한 클래스 내에서 엣지 케이스를 판단할 때는 try-catch로 예외를 처리하기보다, boolean을 활용해 사전에 체크하고 핸들링하는 것이 가독성과 성능 면에서 더 좋은데요. 지금 케이스도 위 케이스에 해당하는 것 같은데 어떻게 생각하시나요?
@@ -0,0 +1,81 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
> 인증 미션의 4단계에서 user_login_after_members 이 테스트 통과가 안되서 고민하다가 임의로 authorizationFilter를� 구현하였습니다. > (현단계에서 어떻게 통과하게 하는걸까요??) 로그인 방식에 따라 Role을 다르게 설정하신 이유는 위 이유 때문이겠죠..?ㅋㅋ 인가에 대한 부분은 2주 차에서 다루는 것으로 알고 있어서, 일단 인가에 대한 부분은 신경쓰지 않고 인증된 사용자를 확인한다! 라는 개념으로 확인해주시면 될 것 같습니다 (만약 아니면 DM 드릴게요..! 속닥속닥..)
@@ -0,0 +1,69 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
필터에서는 마지막에 doFilter()를 호출해야 정상적인 요청 흐름을 유지할 수 있습니다~
@@ -0,0 +1,19 @@ +package nextstep.security.authentication; + +import nextstep.security.role.GrantedAuthority; + +import java.util.List; + +public interface Authentication { + String getPrincipal(); + + String getCredentials(); + + boolean isAuthenticated(); + + List<GrantedAuthority> getAuthorities(); + + ...
Java
애플리케이션에서 Role 을 주입시켜야 할것 같습니다 :)
@@ -0,0 +1,86 @@ +package nextstep.app; + +import nextstep.app.domain.CustomUserDetailsService; +import nextstep.app.domain.MemberRepository; +import nextstep.security.role.Role; +import nextstep.security.core.context.HttpSessionSecurityContextRepository; +import nextstep.security.core.context.SecurityContextRepository...
Java
넵:) 가변인자로 설정하는게 사용하는 입장에서 훨씬 편리할 것 같습니다 감사합니다 👍 --- 재연님 말씀이랑 시큐리티 코드 보면서 뜯어보니 실제 시큐리티를 사용할때 사용하던 securityMatcher(), authorizeHttpRequests() 등으로 filterChain이 선택되고 인가를 발생시키는군요! 어떤 말씀하시는건지 약간 감이 잡히는거 같습니다! 👍 (아닐수도)
@@ -0,0 +1,81 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
~~repository에 context저장을 인증필터 완료 시점이 아닌 SecurityHolderFilter 종료시에 하면 될 거같습니다! 👍~~ 추가로 인증필터에서 SecurityContextHolder내부에 context가 있다면 인증필터를 통과하게 추가하였습니다 !
@@ -0,0 +1,81 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
음.. 잘못짚은거 같네요.. security 코드를 보면 인증 후에 바로 저장을 하는데, filter 내부에서 각 SecurityContextRepository 구현체에 의존하고 있네요!
@@ -0,0 +1,69 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
재연님! 제가 작성한 BasicAuthFilter와 FormAuthFilter는 security 의 UsernamePasswordAuthenticationFilter와 BasicAuthenticationFilter를 참고하여 작성하였는데요. form요청의 경우 'login '요청에 대해서만 필터가 작동하고 인증이 성공 했을때 해당 filter에서 응답을 반환하고 Basic요청의 경우 유효한 Authorization 헤더가 있는 경우 인증을 성공해도 filterchain의 doFilter를 호출 하는것으로 봐서 두 필터간의 filterChain.do...
@@ -0,0 +1,48 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.core....
Java
네 재연님 말씀에 동의합니다 ! 그런데 예외를 처리할때 가능한 최상위 계층에서 처리하면 비즈니스 로직에 너무많은 예외처리 코드가 포함되지 않아 더 좋은것으로 알고있는데요. authorizationFilter에서 발생하는 인증 에러, AuthorizationFilter에서 발생하는 인가 에러 등을 처리 할때 어느 단계에서 에러처리를 하는게 좋을지 조금 어렵네요! security코드도 filter에서 예외처리를 하고있어서 .. 가령 makeAuthentication 같은 메소드에서 요청에 대한 파라미터로 authentication객체를 만들때 예외가 발생하면 처리...
@@ -0,0 +1,19 @@ +package nextstep.security.authentication; + +import nextstep.security.role.GrantedAuthority; + +import java.util.List; + +public interface Authentication { + String getPrincipal(); + + String getCredentials(); + + boolean isAuthenticated(); + + List<GrantedAuthority> getAuthorities(); + + ...
Java
맞습니다! 핵심은 Role을 정하는 역할은 애플리케이션이 돼야 하는데요. 현재 Role은 프레임워크 레벨의 enum 타입으로 정의되어 있네요. Role에 대한 확장성을 열어주기 위해선 Enum이 아닌 조금 더 확장성 있는 형태로 변경한다면 프레임워크 레벨이 아닌 애플리케이션 레벨에서 사용하기 좋아질 것 같습니다!
@@ -0,0 +1,48 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.core....
Java
> 네 재연님 말씀에 동의합니다 ! > 그런데 예외를 처리할때 가능한 최상위 계층에서 처리하면 비즈니스 로직에 너무많은 예외처리 코드가 포함되지 않아 더 좋은것으로 알고있는데요. > authorizationFilter에서 발생하는 인증 에러, AuthorizationFilter에서 발생하는 인가 에러 등을 처리 할때 어느 단계에서 에러처리를 하는게 좋을지 조금 어렵네요! > security코드도 filter에서 예외처리를 하고있어서 .. 가령 makeAuthentication 같은 메소드에서 요청에 대한 파라미터로 authentication객체를 만들때 예외가 ...
@@ -0,0 +1,69 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
기존의 힌트 코드를 꼭 그대로 사용하지 않으셔도 되고, 문제가 있다면 수정하셔도 됩니다 ㅎㅎ Filter의 구조는 디자인패턴 중 하나인 연쇄 책임 패턴의 형태를 가지고 있는데요. Filter는 다른 필터에 대한 정보를 모르는 상태에서 자신의 역할만 수행하고, 문제가 없다면 반드시 다음 필터로 위임하는 것이 정해진 규칙을 가지고 있습니다. 만약 구현 방식에 따라 doFilter() 호출 여부가 달라진다면, 설계를 다시 고민해볼 필요가 있을 것 같습니다!
@@ -0,0 +1,81 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
```suggestion authentication.getAuthorities().add(Role.ADMIN); filterChain.doFilter(request, response); ``` > SecurityContextRepository의 구현체를 Filter에서 주입받아 처리하게 구현해주셨네요! > 스프링은 다른 Filter에서 SecurityContextRepository의 내부 구현을 몰라도 SecurityContextHolder.getContext()를 통해 인증 정보를 활용할 수 있도록 설계되어 있는데요. ...
@@ -0,0 +1,81 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
아! 곰곰히 생각해보니 인증 성공시 filter에서는 SecurityContextHolder에 이미 context를 저장하여 어떤 필터에서도 사용가능하고 repository는 securiyContextHolderFilter에서 응답시 저장해주면 될거같습니다! 인증필터가 repository를 의존하지 않아도 되겠네요!
@@ -0,0 +1,29 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.core.context.SecurityContextHolder; +import nextstep.security....
Java
예외를 공통으로 처리할 수 있어서 좋네요 👍
@@ -0,0 +1,29 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.core.context.SecurityContextHolder; +import nextstep.security....
Java
문제는 없지만, SecurityContextHolder의 초기화 역할은 SecurityContextHolder를 담당하는 Filter에서 하는 규칙을 가져가면 다른 Filter에서는 SecurityContextHolder에 대한 신경을 안써도 될 것 같아요~
@@ -0,0 +1,69 @@ +package nextstep.security.filter; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import nextstep.security.authentication.Authentication; +import nextstep.security.authe...
Java
기존 스프링 시큐리티 코드가 레거시 형태고 두 필터 모두 doFilter를 호출하는 것이 맞다고 생각했는데요. 그 근거로 만약 로그인 후 이후 요청은 처리하지 않는 것이 해당 클래스의 역할이라면 UsernamePasswordAuthenticationFilter와 BasicAuthenticationFilter 두 클래스 모두 doFilter를 호출하지 않아야 한다고 생각했습니다. 근데 생각해보니.. UsernamePasswordAuthenticationFilter 필터는 로그인을 위한 필터고 BasicAuthenticationFilter는 토큰을 검증하는 역할이라 ...
@@ -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
this.state.id.includes('@') && this.state.id.length >= 5 && this.state.pw.length >= 8 이걸 true/false 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
이건 왜 주석으로 되있나요???
@@ -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
제이슨 파일도 있었군요!
@@ -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
버튼으로 한 이유가 있나요? 궁금
@@ -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
autoComplete 이거는 뭔가요? 궁금~
@@ -0,0 +1,128 @@ +@import '../../../../styles/variables.scss'; + +article { + margin-bottom: 20px; + background-color: #fff; + border-radius: 3px; + border: 1px solid $border-color; + + header { + @include flex-center; + justify-content: space-between; + align-content: center; + padding: 10px; + + ...
Unknown
이런 scss 기능 저는 헷갈려서 잘 못하겠던데 잘하시네요..
@@ -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
댓글 프랍스!
@@ -0,0 +1,46 @@ +export const FOOTLIST = [ + { + id: 1, + footlist: '소개', + }, + { + id: 2, + footlist: '도움말', + }, + { + id: 3, + footlist: '홍보 센터', + }, + { + id: 4, + footlist: 'API', + }, + { + id: 5, + footlist: '채용 정보', + }, + { + id: 6, + footlist: '개인정보처리방침', + }...
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
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;```
@@ -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
멘토 리뷰 반영 완료(?)
@@ -0,0 +1,30 @@ +package nextstep.security.context; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import org.springframework.web.filter.GenericFilterBean...
Java
chain.doFilter(request, response) 중 예외가 발생하면 clearContext()가 호출되지 않을 수 있겠네요 finally 블록에서 호출하도록 변경해보면 어떨까요? 😄
@@ -0,0 +1,9 @@ +package nextstep.security.exception; + +public class AuthenticationException extends RuntimeException { + public AuthenticationException() {} + + public AuthenticationException(String message) { + super(message); + } +}
Java
현재 `AuthenticationException`을 싱글턴 인스턴스로 미리 생성해두고 있는데요. 이 방식은 불필요한 객체 생성을 방지하고 일관된 예외 메시지 제공이라는 장점이 있지만, 스택 트레이스가 남지 않는다는 문제가 있습니다. 혹시 이 부분을 인지하고 계실까요? 😄
@@ -0,0 +1,24 @@ +package nextstep.security.authentication.manager; + +import nextstep.security.authentication.Authentication; +import nextstep.security.authentication.provider.AuthenticationProvider; +import nextstep.security.exception.AuthenticationProviderException; + +import java.util.List; + +public class Provider...
Java
소소하지만 다음과 같이 개행을 하면 좀더 가독성이 좋을 것 같아요 😄 ```suggestion @Override public Authentication authenticate(Authentication authenticationToken) { return providers.stream() .filter(provider -> provider.supports(authenticationToken.getClass())) .findFirst() .orElseThrow(Authenticati...
@@ -0,0 +1,9 @@ +package nextstep.security.exception; + +public class AuthenticationException extends RuntimeException { + public AuthenticationException() {} + + public AuthenticationException(String message) { + super(message); + } +}
Java
앗 스택 트레이스 부분을 생각을 못했네요. [394ed26](https://github.com/next-step/spring-security-authentication/pull/28/commits/394ed26a7c3b3dea8c17c1192cbed19393315d0f) 커밋에서 매번 새로운 객체를 생성하도록 수정했습니다. 하는 김에 커스텀 예외를 더 세분화할 수 있도록 하였습니다.
@@ -0,0 +1,24 @@ +package nextstep.security.authentication.manager; + +import nextstep.security.authentication.Authentication; +import nextstep.security.authentication.provider.AuthenticationProvider; +import nextstep.security.exception.AuthenticationProviderException; + +import java.util.List; + +public class Provider...
Java
[58614f1](https://github.com/next-step/spring-security-authentication/pull/28/commits/58614f1d4af41421b2f16d76eb1323fbf34c3bf9) 커밋에서 indentation 스타일 변경 반영했습니다.
@@ -0,0 +1,30 @@ +package nextstep.security.context; + +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import org.springframework.web.filter.GenericFilterBean...
Java
앗 정말로 그렇겠네요. Filter 에서 예외처리 때문에 고생한적이 있는데, 지적해주셔서 감사합니다! ❤️ 항상 동작해야하는 로직은 finally 문법 활용하는 습관을 가져야겠네요. 실무에서 당장 활용해야겠다는 생각이 드는 유용한 피드백 감사합니다. [9e5ef93](https://github.com/next-step/spring-security-authentication/pull/28/commits/9e5ef934299204a6fd37b266e7dbb52f0e2b294a) 커밋에서 finally 블록에서 clearContext 가 호출되도록 변경했습니다...
@@ -0,0 +1,41 @@ +package nextstep.security.authentication.token; + +import jakarta.servlet.http.HttpServletRequest; +import nextstep.security.authentication.Authentication; +import nextstep.security.exception.AuthenticationTokenException; + +import java.util.Base64; + +import static org.springframework.http.HttpHeader...
Java
`HttpHeaders.AUTHORIZATION`를 사용할 수 있을 것 같네요 😄
@@ -0,0 +1,41 @@ +package nextstep.security.authentication.token; + +import jakarta.servlet.http.HttpServletRequest; +import nextstep.security.authentication.Authentication; +import nextstep.security.exception.AuthenticationTokenException; + +import java.util.Base64; + +import static org.springframework.http.HttpHeader...
Java
[65922ab](https://github.com/next-step/spring-security-authentication/pull/28/commits/65922ab2a9189e06adb07bd8950a96416d723db0) 커밋에서 반영 완료했습니다!
@@ -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 []` 을 특별히 추가해주신 이유가 있을까요~?