code
stringlengths
41
34.3k
lang
stringclasses
8 values
review
stringlengths
1
4.74k
@@ -0,0 +1,25 @@ +package christmas.validator; + +import christmas.constant.ErrorMessage; + +public class DateValidator implements Validator{ + @Override + public void check(final String input) { + checkInteger(input); + checkOutOfRange(input); + } + + private void checkInteger(final String in...
Java
1๊ณผ 31์ด ๋งค์ง๋„˜๋ฒ„๋ผ๊ณ  ์ƒ๊ฐํ•ด์š”! ์ƒ์ˆ˜๋กœ ๋นผ์ฃผ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,28 @@ +package christmas.domain; + +import christmas.util.Utils; +import christmas.view.OutputView; + +public class OrderPrice { + // ๊ธˆ์•ก๊ณผ ๊ด€๋ จ๋œ ํด๋ž˜์Šค์ž…๋‹ˆ๋‹ค. + // ํ• ์ธ ์ „ ์ด ์ฃผ๋ฌธ๊ธˆ์•ก, ํ• ์ธ ํ›„ ์˜ˆ์ƒ ๊ฒฐ์ œ ๊ธˆ์•ก ๋“ฑ์„ ๊ด€๋ฆฌํ•˜๋Š” ํด๋ž˜์Šค ์ž…๋‹ˆ๋‹ค. + private static final String UNIT = "์›"; + private OrderRepository orders; + private int total...
Java
'์›' ๊ฐ™์€ ๋‹จ์œ„๋Š” ์ถœ๋ ฅ ๋ฐ ํฌ๋งคํŒ…๊ณผ ๊ด€๊ณ„์žˆ์œผ๋ฏ€๋กœ OutputView์— ์žˆ๋Š” ๊ฒƒ์ด ์ข€ ๋” ์ ์ ˆํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š”๋ฐ ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์‹œ๋‚˜์š”??ใ…Žใ…Ž
@@ -0,0 +1,40 @@ +package christmas.domain; + +import christmas.view.OutputView; + +public class EventBadge { + // ์ด๋ฒคํŠธ ๋ฑƒ์ง€๋ฅผ ๊ด€๋ฆฌ ํ•˜๋Š” ํด๋ž˜์Šค ์ž…๋‹ˆ๋‹ค. + private static final int SANTA_MINIMUM_LIMIT = 20000; + private static final int TREE_MINIMUM_LIMIT = 20000; + private static final int STAR_MINIMUM_LIMIT = 20000; + ...
Java
์ฒ˜์Œ๋ณด๋Š” ์‚ฌ๋žŒ์€ discountAmount์— -๋ฅผ ์™œ ๋ถ™์ด์ง€? ๋ผ๊ณ  ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค! ์ €๋„ ๋น„์Šทํ•˜๊ฒŒ ๊ตฌํ˜„ํ•˜๊ณ  ํ”ผ๋“œ๋ฐฑ์„ ๋ฐ›์•˜๋Š”๋ฐ ๋ณ€์ˆ˜์ด๋ฆ„๊ณผ final์„ ์ด์šฉํ•ด -๋ฅผ ๋ถ™์ธ ๋ณ€์ˆ˜๊ฐ€ ๋ฌด์—‡์„ ๋œปํ•˜๋Š”์ง€ ํ•œ๋ฒˆ ๋” ์ •์˜ํ•ด์ฃผ๋Š” ๊ฒƒ๋„ ์ข‹๋‹ค๊ณ  ์ƒ๊ฐํ•ด์š”!
@@ -0,0 +1,178 @@ +package christmas.domain; + +import christmas.constant.Constants; +import christmas.constant.Menu; +import christmas.constant.MenuType; +import christmas.util.Utils; +import christmas.view.OutputView; +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.util.ArrayList; +import java....
Java
๋งค์ง๋„˜๋ฒ„๊ฐ€ ๋งŽ์ด ์“ฐ์ธ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ์œ„์—์„œ ์ƒ์ˆ˜๋กœ ์„ ์–ธํ•ด์ฃผ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”~!!
@@ -0,0 +1,105 @@ +package christmas.controller; + +import christmas.domain.BenefitInformation; +import christmas.domain.Date; +import christmas.domain.EventBadge; +import christmas.domain.GiftMenu; +import christmas.domain.Order; +import christmas.domain.OrderManager; +import christmas.domain.OrderPrice; +import chris...
Java
๋„๋ฉ”์ธ๋ณด๋‹ค๋Š” controller์—์„œ outputView๋ฅผ ํ˜ธ์ถœํ•ด์ฃผ๋Š” ๊ตฌ์กฐ๊ฐ€ ๋˜์–ด์•ผํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค ใ…Žใ…Ž ๋งŒ์•ฝ mvc ๊ตฌ์กฐ๋ผ๋ฉด์š”!!
@@ -0,0 +1,21 @@ +package christmas.constant; + +public enum Constants { + EVENT_START_DATE(1), + EVENT_END_DATE(25), + MENU_LIMIT(20), + CHAMPAGNE_LIMIT(120000), + MINIMUM_DISCOUNT_ABLE_AMOUNT(10000), + THIS_YEAR(2023), + EVENT_MONTH(12); + + public int constants; + + Constants(final int con...
Java
ํ•ด๋‹น ์ƒ์ˆ˜ ๊ฐ’๋“ค์„ ํ•„์š”ํ•œ ๊ฐ ๋„๋ฉ”์ธ์ด ๋“ค๊ณ  ์žˆ๋Š” ๊ฒƒ์€ ์–ด๋–ค๊ฐ€์š”~~?? ๊ทธ๋ ‡๊ฒŒ ํ•˜๋ฉด ํด๋ž˜์Šค์˜ ์‘์ง‘๋„๋ฅผ ์กฐ๊ธˆ ๋” ๋†’์ผ ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,13 @@ +package christmas.domain; + +public class Date { + private int date; + + public Date(final int date) { + this.date = date; + } + + public int getDate() { + return this.date; + } +} \ No newline at end of file
Java
ํ•ด๋‹น ํด๋ž˜์Šค๊ฐ€ ์กด์žฌํ•˜๋Š” ์ด์œ ๊ฐ€ ์žˆ๋‚˜์š”?!! ํด๋ž˜์Šค๋กœ์„œ ์™„์ „ํ•˜๋ ค๋ฉด Date์™€ ๊ด€๋ จ๋œ validate ์ฝ”๋“œ๊ฐ€ ์ƒ์„ฑ์ž ์•ˆ์— ์žˆ์–ด์•ผํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค..!!!
@@ -0,0 +1,13 @@ +package christmas.domain; + +public class Date { + private int date; + + public Date(final int date) { + this.date = date; + } + + public int getDate() { + return this.date; + } +} \ No newline at end of file
Java
๋˜ํ•œ record๋กœ ๋ฐ”๊ฟ”๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™๋„ค์š” ใ…Žใ…Ž
@@ -0,0 +1,21 @@ +package christmas.constant; + +public enum Constants { + EVENT_START_DATE(1), + EVENT_END_DATE(25), + MENU_LIMIT(20), + CHAMPAGNE_LIMIT(120000), + MINIMUM_DISCOUNT_ABLE_AMOUNT(10000), + THIS_YEAR(2023), + EVENT_MONTH(12); + + public int constants; + + Constants(final int con...
Java
๊ฐ ๋„๋ฉ”์ธ์ด ๋“ค๋ฉฐ ์‘์ง‘๋„๋ฅผ ๋†’ํžˆ๋Š” ๋ฐฉ๋ฒ•๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ๐Ÿซ 
@@ -0,0 +1,105 @@ +package christmas.controller; + +import christmas.domain.BenefitInformation; +import christmas.domain.Date; +import christmas.domain.EventBadge; +import christmas.domain.GiftMenu; +import christmas.domain.Order; +import christmas.domain.OrderManager; +import christmas.domain.OrderPrice; +import chris...
Java
MVC ๋งŽ์ด ๊ณต๋ถ€ํ•ด์•ผ ๊ฒ ๋„ค์š” ใ… ใ… 
@@ -0,0 +1,13 @@ +package christmas.domain; + +public class Date { + private int date; + + public Date(final int date) { + this.date = date; + } + + public int getDate() { + return this.date; + } +} \ No newline at end of file
Java
recordํ˜•์€ ์„œ์šฐ๋‹˜ ์ฝ”๋“œ ๋ณด๋ฉด์„œ ์ฒ˜์Œ ๋ฐฐ์› ๋Š”๋ฐ ์œ ์šฉํ•˜๊ฒŒ ์ž˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ! `date`์— `validate`๊ฐ€ ์—†๋Š” ์ด์ƒ์€ ์‚ฌ์‹ค ์˜๋ฏธ๊ฐ€ ์—†๋Š”๊ฑฐ ๊ฐ™๋„ค์š”,,ใ…Žใ…Ž
@@ -0,0 +1,40 @@ +package christmas.domain; + +import christmas.view.OutputView; + +public class EventBadge { + // ์ด๋ฒคํŠธ ๋ฑƒ์ง€๋ฅผ ๊ด€๋ฆฌ ํ•˜๋Š” ํด๋ž˜์Šค ์ž…๋‹ˆ๋‹ค. + private static final int SANTA_MINIMUM_LIMIT = 20000; + private static final int TREE_MINIMUM_LIMIT = 20000; + private static final int STAR_MINIMUM_LIMIT = 20000; + ...
Java
๋ชจ๋ฅด๋Š” ์‚ฌ๋žŒ์ด ์ฝ”๋“œ๋ฅผ ๋ณด๋ฉด ์™œ ์žˆ์ง€? ์ƒ๊ฐํ•  ์ˆ˜๋Š” ์žˆ๊ฒ ๋„ค์š”! ๋ณ€์ˆ˜๋ช…๊ณผ, ์ฃผ์„์„ ํ†ตํ•ด ์˜๋ฏธ๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ๊ฒƒ๋„ ์ข‹์€ ๋ฐฉ๋ฒ•์ธ ๊ฒƒ ๊ฐ™๋„ค์š” ๐Ÿซ 
@@ -0,0 +1,28 @@ +package christmas.domain; + +import christmas.util.Utils; +import christmas.view.OutputView; + +public class OrderPrice { + // ๊ธˆ์•ก๊ณผ ๊ด€๋ จ๋œ ํด๋ž˜์Šค์ž…๋‹ˆ๋‹ค. + // ํ• ์ธ ์ „ ์ด ์ฃผ๋ฌธ๊ธˆ์•ก, ํ• ์ธ ํ›„ ์˜ˆ์ƒ ๊ฒฐ์ œ ๊ธˆ์•ก ๋“ฑ์„ ๊ด€๋ฆฌํ•˜๋Š” ํด๋ž˜์Šค ์ž…๋‹ˆ๋‹ค. + private static final String UNIT = "์›"; + private OrderRepository orders; + private int total...
Java
๋”ฐ๋กœ OutputView ํด๋ž˜์Šค์— ์„ ์–ธํ•˜๋Š”๊ฒŒ ์ข€ ๋” ์ ์ ˆํ•ด ๋ณด์ด๋„ค์š” ใ…Žใ…Ž
@@ -0,0 +1,135 @@ +package christmas.validator; + +import christmas.constant.Constants; +import christmas.constant.ErrorMessage; +import christmas.constant.Menu; +import christmas.util.Utils; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +impo...
Java
์ข‹์€ ์ •๋ณด ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ๐Ÿ”ฅ๐Ÿ”ฅ
@@ -0,0 +1,88 @@ +import { createGlobalStyle } from 'styled-components' +import reset from 'styled-reset' + +const MainStyles = createGlobalStyle` + .relative{position:relative} + .absolute{position:absolute} + .fixed{position:fixed} + + .flex-center-between { + display: flex; + align-ite...
TypeScript
์ด๋ ‡๊ฒŒ ์“ฐ๊ณ  ์‹ถ๋‹ค๋ฉด, ๊ด€๋ จ `styles/mixin.ts`์— mixin ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. // flex๊ด€๋ จ mixin ```suggestion interface FlexMixin={ justifyContent?:'center' | 'flex-end' | 'flex-start' | 'space-evenly' alignItems? :'center' | 'flex-end' } export const MixinFlex({ alignItems,justifyContent } : FlexMixin) { ...
@@ -0,0 +1,106 @@ +package nextstep.security.authorization.hierarchy; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.util.Collection; +import java.util.Set; + +import static org.assertj.core....
Java
๊ผผ๊ผผํ•œ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ๐Ÿ‘
@@ -1,20 +1,22 @@ package nextstep.security.authorization; import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.hierarchy.RoleHierarchy; import java.util.Set; public class AuthorityAuthorizationManager<T> implements AuthorizationManager<T> { - private final Author...
Java
Spring Security์˜ AuthoritiesAuthorizationManager๋Š” String... authorities๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์ค‘ ๊ถŒํ•œ์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค๊ณ„๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ฐ€๋ณ€์ธ์ž ํ™œ์šฉ์„ ํ†ตํ•ด AuthorityAuthorizationManager๊ฐ€ ๋” ์œ ์—ฐํ•˜๊ฒŒ ๋™์ž‘ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด๋ณด๋ฉด ์–ด๋–จ๊นŒ์š”? ๐Ÿ˜„ ```suggestion public AuthorityAuthorizationManager(RoleHierarchy roleHierarchy, String... authorities) { ```
@@ -0,0 +1,126 @@ +package nextstep.security.authorization.hierarchy; + +import org.springframework.util.Assert; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Queue; +import ...
Java
๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ•ด๋ณผ ์ˆ˜๋„ ์žˆ๊ฒ ๋„ค์š” ๐Ÿ˜„ ```suggestion Set<String> childRoles = Set.of(impliedRoles); ```
@@ -0,0 +1,126 @@ +package nextstep.security.authorization.hierarchy; + +import org.springframework.util.Assert; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Queue; +import ...
Java
์ˆœํ™˜ ์ฐธ์กฐ๊ฐ€ ์ผ์–ด๋‚  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š” ์—ญํ•  ๊ณ„์ธต์„ ์„ค์ •ํ•  ๋•Œ ์ˆœํ™˜ ์ฐธ์กฐ(์‚ฌ์ดํด)์— ๋Œ€ํ•œ ์˜ˆ์™ธ์ฒ˜๋ฆฌ๋ฅผ ํ•ด๋ณด๋Š”๊ฑด ์–ด๋–จ๊นŒ์š”? ๐Ÿ˜„
@@ -0,0 +1,126 @@ +package nextstep.security.authorization.hierarchy; + +import org.springframework.util.Assert; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Queue; +import ...
Java
Spring Security๋Š” ์„ฑ๋Šฅ ์ตœ์ ํ™”๋ฅผ ์ค‘์š”ํ•˜๊ฒŒ ์ƒ๊ฐํ•˜๋Š”๋ฐ์š”, ArrayDeque ์‚ฌ์šฉ์„ ํ†ตํ•ด ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ ์‹œ์ผœ๋ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ๐Ÿ˜„ ```suggestion Queue<String> queue = new ArrayDeque<>(authorities); ```
@@ -1,20 +1,22 @@ package nextstep.security.authorization; import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.hierarchy.RoleHierarchy; import java.util.Set; public class AuthorityAuthorizationManager<T> implements AuthorizationManager<T> { - private final Author...
Java
Set ์œผ๋กœ ์ค‘๋ณต์„ ์ œ๊ฑฐํ•ด ์ฃผ์…จ๊ตฐ์š” ๐Ÿ‘
@@ -0,0 +1,35 @@ +package db; + +import db.HttpSessions; +import model.User; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import webserver.domain.Session; + +import static org.assertj.core.api.Assertions.assertThat; + +public class HttpSessionsTest { + + @Test + @DisplayName("์„ธ์…˜...
Java
ํ…Œ์ŠคํŠธ๋„ Session ์ถ”๊ฐ€์‹œ์— ๊ฐ™์ด ํ•ด์ฃผ์…จ๋„ค์š”. ๐Ÿ‘
@@ -0,0 +1,35 @@ +package db; + +import db.HttpSessions; +import model.User; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import webserver.domain.Session; + +import static org.assertj.core.api.Assertions.assertThat; + +public class HttpSessionsTest { + + @Test + @DisplayName("์„ธ์…˜...
Java
๋ถˆ์ผ์น˜๊นŒ์ง€ ๐Ÿ‘
@@ -0,0 +1,35 @@ +package db; + +import db.HttpSessions; +import model.User; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import webserver.domain.Session; + +import static org.assertj.core.api.Assertions.assertThat; + +public class HttpSessionsTest { + + @Test + @DisplayName("์„ธ์…˜...
Java
์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” import๋Š” ์ œ๊ฑฐํ•˜์ฃ  ๐Ÿ˜‰
@@ -16,10 +16,10 @@ public class HttpResponse { private HttpStatusCode httpStatusCode; private Map<String, String> headers; - private List<Cookie> cookies; + private Cookies cookies; private byte[] body; - public HttpResponse(HttpStatusCode httpStatusCode, Map<String, String> headers, List<C...
Java
์ง€๊ธˆ์€ ์ œ๊ฑฐํ•˜์…จ์ง€๋งŒ ๋””๋ฒ„๊น… ๋ชฉ์ ์œผ๋กœ System.out.println์ด ์•„๋‹ˆ๋ผ logger.debug๋ฅผ ์‚ฌ์šฉํ•ด์ฃผ์…จ์—ˆ๋„ค์š”. ๐Ÿ’ฏ
@@ -105,9 +105,15 @@ public String getBody() { } public boolean containsCookie(String cookie) { - return this.headers - .get(HttpHeader.COOKIE) - .contains(cookie); + String requestCookie = this.headers.get(HttpHeader.COOKIE); + if (requestCookie != null) {...
Java
์•ฝ๊ฐ„์˜ ๊ฐœ์ธ์ ์ธ ์„ ํ˜ธ์ธ๋ฐ ์ง€๊ธˆ์€ ๋ณต์žกํ•˜์ง€ ์•Š์•„์„œ ์ฐจ์ด๊ฐ€ ํฌ์ง€ ์•Š์ง€๋งŒ ์‚ฌ๋žŒ์€ ๋ถ€์ •๋ณด๋‹ค๋Š” ๊ธ์ •์„ ๋” ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์ฝ๋Š” ๊ฒฝํ–ฅ์ด ์žˆ์–ด์„œ ๊ฐ€๋Šฅํ•˜๋‹ค๋ฉด ๊ธ์ •์˜ ์กฐ๊ฑด์„ ์„ ํƒํ•˜๋Š” ํŽธ์ž…๋‹ˆ๋‹ค. ```java if (StringUtils.hasText(requestCookie)) { return requestCookie.contains(cookie); } return false; ``` ๋นˆ ๋ฌธ์ž์—ด์ผ ๋•Œ๋Š” ์–ด๋–ป๊ฒŒ ํ•ด์•ผํ• ์ง€๋Š” ์‚ด์ง ๊ณ ๋ฏผ๋˜๋„ค์š”.
@@ -0,0 +1,31 @@ +package db; + +import webserver.domain.Session; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +public class HttpSessions { + private static final Map<String, Session> sessions = new HashMap<>(); + + public static String getId() { + return UUID.randomUUID()....
Java
์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ณตํ†ต์ ์œผ๋กœ ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ๊ฒŒ DB๋กœ ์‚ฌ์šฉํ•ด ์ฃผ์…จ๋„ค์š” ๐Ÿ‘
@@ -0,0 +1,31 @@ +package db; + +import webserver.domain.Session; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +public class HttpSessions { + private static final Map<String, Session> sessions = new HashMap<>(); + + public static String getId() { + return UUID.randomUUID()....
Java
ํ‚ค ์ƒ์„ฑ์„ ์–ด๋–ป๊ฒŒ ํ• ๊นŒ ๊ณ ๋ฏผํ•˜๋‹ค๊ฐ€ DB๊ฐ€ ํ‚ค์ƒ์„ฑ์„ ํ•˜๋Š”๊ฑธ ๊ณ ๋ คํ•˜์—ฌ ์—ฌ๊ธฐ ๋„ฃ์–ด ์ฃผ์‹  ๊ฒƒ ๊ฐ™๋„ค์š”. DB์—์„œ ๋ณดํ†ต ์ด์™€ ๊ฐ™์€ ๋‚œ์ˆ˜๋กœ ํ‚ค๋ฅผ ๋งŒ๋“ค์ง€๋„ ์•Š๊ณ , HttpSessions๊ฐ€ ์•„๋‹Œ ๋‹ค๋ฅธ DB, ์˜ˆ๋ฅผ ๋“ค๋ฉด Redis๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋‹จ์ˆœํžˆ DB๋ฅผ ๋ฐ”๊พธ๋Š” ๊ฑธ๋กœ ์ž‘์—…์ด ๋๋‚˜์ง€ ์•Š๊ณ  ๋‚œ์ˆ˜ ์ƒ์„ฑ์— ๋Œ€ํ•œ ๊ณ ๋ฏผ์„ ํ•˜์…”์•ผ ํ• ํ…๋ฐ ์ด์— ๋Œ€ํ•œ ์—ญํ• ์„ DB๊ฐ€ ์•„๋‹Œ ๊ณณ์œผ๋กœ ๋„˜๊ฒจ๋ณด์ฃ . ์ด๊ฑด ์•„๋ž˜ Request๊ด€๋ จ ๋‚ด์šฉ์— ๋‚จ๊ธธ๊ฒŒ์š”!
@@ -1,24 +1,43 @@ package webserver.controller; import db.DataBase; +import db.HttpSessions; import model.User; +import org.checkerframework.checker.units.qual.C; import webserver.domain.*; +import java.util.UUID; + public class LoginController extends AbstractController { @Override public HttpRespon...
Java
Session์— ๋Œ€ํ•œ ์ถ”๊ฐ€๋กœ ์ƒ๋‹นํžˆ ๋ณต์žกํ•ด์กŒ๋„ค์š”. Controller์˜ ๋Œ€๋ถ€๋ถ„์˜ ์ฝ”๋“œ๊ฐ€ Http์— ๋Œ€ํ•œ ์ž‘์—…์ธ๋ฐ Session๋„ ๊ฒฐ๊ตญ Http์˜ ์ŠคํŽ™์ธ๊ฑธ ๊ณ ๋ คํ•ด์„œ Request, Response๋ฅผ ํ†ตํ•ด ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ์š”? (์œ„์— ๋ง์”€๋“œ๋ฆฐ session id์˜ ์ถ”๊ฐ€ ๋˜ํ•œ ๋ง์ด์ฃ .) ๊ทธ๋Ÿฌ๋ฉด Controller๋Š” Session์„ ๊ฐ€์ ธ์˜ค๊ณ , ์ถ”๊ฐ€ ์š”์ฒญ๋งŒ ํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ ์‚ฌ์šฉํ•˜๊ธฐ๋งŒ ํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š”.
@@ -1,21 +1,27 @@ package webserver.domain; + +import java.util.Objects; + public class Cookie { + public static final String PATH = "Path"; private String name; private String value; - private String pathName; - private String pathValue; + private String path; public Cookie(String name...
Java
`cookieString` ํƒ€์ž…์„ ๋ณ€์ˆ˜๋ช…์— ์จ์ค„ ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,42 @@ +package webserver.domain; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.util.StringUtils; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class Cookies { + private static final Logger logger = LoggerFactory.getLogger...
Java
[Java8 Stream์€ loop๊ฐ€ ์•„๋‹ˆ๋‹ค.](https://www.popit.kr/java8-stream%EC%9D%80-loop%EA%B0%80-%EC%95%84%EB%8B%88%EB%8B%A4/) ```java for (String str : cookiesString.trim().split(";")) { String[] keyValue = str.split("="); cookies.put(keyValue[0].trim(), new Cookie(keyValue[0].trim(), keyValue...
@@ -0,0 +1,29 @@ +package webserver.domain; + + +import java.util.HashMap; +import java.util.Map; + +public class Session { + private Map<String, Object> attribute; + + public Session() { + this.attribute = new HashMap<>(); + } + + public Object getAttribute(String name) { + return attribute.g...
Java
๊ตฐ๋”๋”๊ธฐ ์—†์ด ์ž˜ ๊ตฌํ˜„ํ–ˆ๋„ค์š”. ๐Ÿ‘
@@ -0,0 +1,33 @@ +package com.hansarangdelivery.config; + +import com.hansarangdelivery.entity.PageType; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +imp...
Java
์ด ๋ถ€๋ถ„์—์„œ size๋ฅผ 10,30,50 ์ ์šฉ์‹œ์ผœ์•ผ ํ• ๊ฒƒ ๊ฐ™์•„์š”
@@ -0,0 +1,155 @@ +package com.coffeebean.domain.review.review.service; + +import com.coffeebean.domain.order.order.DeliveryStatus; +import com.coffeebean.domain.order.orderItem.entity.OrderItem; +import com.coffeebean.domain.order.orderItem.repository.OrderItemRepository; +import com.coffeebean.domain.review.review.Re...
Java
**P4:** Entity๋ฅผ DTO๋กœ ๋งŒ๋“œ๋Š” DTO ์ƒ์„ฑ์ž๋ฅผ ๋งŒ๋“ค์–ด ์‚ฌ์šฉํ•ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,21 @@ +package com.coffeebean.domain.review.review; + + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +// ์ž‘์„ฑ ๊ฐ€๋Šฅ ๋ฆฌ๋ทฐ +public class ReviewableOrder...
Java
ํ˜„์žฌ ํŽ˜์ด์ง€์—์„œ ๋ฆฌ๋ทฐ ์ž‘์„ฑ์„ ํ–ˆ์„ ๋•Œ์—” `์ž‘์„ฑ ์™„๋ฃŒ`๋กœ ํ‘œ์‹œ๋˜๋Š”๋ฐ, ๋‹ค์‹œ ์ ‘์†ํ•˜๋ฉด `๋ฆฌ๋ทฐ ์ž‘์„ฑ`์œผ๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ์ž‘์„ฑ ๊ฐ€๋Šฅ ๋ฆฌ๋ทฐ ์‘๋‹ต `ReviewableOrderItemDto`์— ๋ฆฌ๋ทฐ๋˜์—ˆ๋Š”์ง€ ์—ฌ๋ถ€ `isReviewed`๋‚˜ `reviewId`๋ฅผ ์ถ”๊ฐ€ํ•ด์„œ ์‘๋‹ตํ•˜๋ฉด ํŽ˜์ด์ง€์— ๋‹ค์‹œ ์ ‘์†ํ–ˆ์„ ๋•Œ ๋ฆฌ๋ทฐ๊ฐ€ ์ž‘์„ฑ๋œ ์ฃผ๋ฌธ์€ ์ž‘์„ฑ ์™„๋ฃŒ๋กœ ํ‘œ์‹œํ•˜๋Š”๋ฐ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,21 @@ +package com.coffeebean.domain.review.review; + + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +// ์ž‘์„ฑ ๊ฐ€๋Šฅ ๋ฆฌ๋ทฐ +public class ReviewableOrder...
Java
์–ด ๊ทธ๋Ÿฐ๊ฐ€์š”?! ํ•„๋“œ ์ถ”๊ฐ€ํ• ๊นŒ ํ•˜๋‹ค๊ฐ€ ํ”„๋ก ํŠธ์—์„œ๋งŒ ์ฒ˜๋ฆฌ๋ฅผ ํ–ˆ๋Š”๋ฐ ๊ทธ๋Ÿด ์ˆ˜ ์žˆ๊ฒ ์–ด์š” ๋‹ค์‹œ ํ•œ ๋ฒˆ ํ™•์ธํ•ด ๋ณผ๊ฒŒ์š” ๋ง์”€ํ•ด ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ์ˆ˜์ •ํ•˜๊ณ  ๋‹ค์‹œ ์˜ฌ๋ฆด๊ฒŒ์š”! ใ…Ž.ใ…Ž
@@ -0,0 +1,79 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); + +* { + box-sizing: border-box; +} +body{ + background-color:#fafafa; +} + +.login-wrap{ + width:30%; + height:550px; + background-color:#fff; + border:3px solid rgba(221, 221, 221, 0.3); + margin:130px...
Unknown
CSS ์†์„ฑ ์ˆœ์„œ๋Œ€๋กœ ๋ณ€๊ฒฝํ•˜๋ฉด ๋” ์ข‹์„๊ฒƒ ๊ฐ™์•„์š” margin, padding ๋‹ค์Œ font-size ์ˆœ์ด๋„ค์š” ;)
@@ -0,0 +1,32 @@ +import React from "react"; +import "./Footer.scss"; + +class Footer extends React.Component { + render() { + return ( + <footer> + <ul> + {RIGHT_FOOTER.map((element, index) => { + return <li key={index}>{element}</li>; + })} + </ul> + <p class...
JavaScript
footer ๋‚ด์šฉ ์ž˜ ๋งŒ๋“œ์…จ๋„ค์š” bb
@@ -0,0 +1,79 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); + +* { + box-sizing: border-box; +} +body{ + background-color:#fafafa; +} + +.login-wrap{ + width:30%; + height:550px; + background-color:#fff; + border:3px solid rgba(221, 221, 221, 0.3); + margin:130px...
Unknown
๋„ต ์ˆ˜์ •ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,98 @@ +import { Component } from "react"; +import { Link, withRouter } from "react-router-dom"; +import "./Login.scss"; + +class Login extends Component { + constructor() { + super(); + this.state = { + id: "", + pw: "", + }; + } + + // localStorage.clear(); + // localStorage.removeIte...
JavaScript
this.state ๋Š” ๊ตฌ์กฐ๋ถ„ํ•ดํ• ๋‹น์„ ์‚ฌ์šฉํ•ด์„œ ์ •๋ฆฌํ•ด์ฃผ์‹œ๋ฉด ๋” ๊น”๋”ํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,98 @@ +import { Component } from "react"; +import { Link, withRouter } from "react-router-dom"; +import "./Login.scss"; + +class Login extends Component { + constructor() { + super(); + this.state = { + id: "", + pw: "", + }; + } + + // localStorage.clear(); + // localStorage.removeIte...
JavaScript
์š” ๋ถ€๋ถ„ ๋…ธ์…˜์—์„œ ๋ดค๋Š”๋ฐ handleId๋ž‘ handlePw๊ฐ™์ด ๋˜‘๊ฐ™์€ ํ˜•์‹์˜ event handler๋ผ์„œ ํ•ฉ์น ์ˆ˜ ์žˆ๋”๋ผ๊ตฌ์š”! ์ €๋„ ์•„์ง์•ˆํ–ˆ์ง€๋งŒ...^^ ๊ฐ™์ด ํ•ด๋ณด์•„์š” ใ…‹ใ…‹ใ…‹
@@ -0,0 +1,79 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); + +* { + box-sizing: border-box; +} +body{ + background-color:#fafafa; +} + +.login-wrap{ + width:30%; + height:550px; + background-color:#fff; + border:3px solid rgba(221, 221, 221, 0.3); + margin:130px...
Unknown
์ž์ฃผ์“ฐ๋Š” border variable ์—๋‹ค๊ฐ€ ์ €์žฅํ•ด๋†“๊ณ  ์“ฐ๋‹ˆ๊นŒ ํŽธํ•˜๊ณ  ์ข‹๋”๋ผ๊ตฌ์š”!
@@ -0,0 +1,21 @@ +import React from "react"; +import "./MainRight.scss"; +import RecommendHeader from "./MainRight/RecommendHeader"; +import RecommendTitle from "./MainRight/RecommendTitle"; +import RecommendFriends from "./MainRight/RecommendFriends"; +import Footer from "./MainRight/Footer"; + +class MainRight extend...
JavaScript
์˜ค ๋ฒŒ์จ ๋‹ค ๋‚˜๋ˆ„์…จ๋‹ค๋‹ ๐Ÿ‘
@@ -0,0 +1,21 @@ +import React from "react"; +import "./MainRight.scss"; +import RecommendHeader from "./MainRight/RecommendHeader"; +import RecommendTitle from "./MainRight/RecommendTitle"; +import RecommendFriends from "./MainRight/RecommendFriends"; +import Footer from "./MainRight/Footer"; + +class MainRight extend...
JavaScript
๊น”๋”....๐Ÿคญ
@@ -0,0 +1,98 @@ +import { Component } from "react"; +import { Link, withRouter } from "react-router-dom"; +import "./Login.scss"; + +class Login extends Component { + constructor() { + super(); + this.state = { + id: "", + pw: "", + }; + } + + // localStorage.clear(); + // localStorage.removeIte...
JavaScript
์˜ค์˜ท ํ•œ๋ฒˆ ์‹œ๋„ํ•ด๋ด์•ผ๊ฒ ์–ด์š”!
@@ -0,0 +1,21 @@ +import React from "react"; +import "./MainRight.scss"; +import RecommendHeader from "./MainRight/RecommendHeader"; +import RecommendTitle from "./MainRight/RecommendTitle"; +import RecommendFriends from "./MainRight/RecommendFriends"; +import Footer from "./MainRight/Footer"; + +class MainRight extend...
JavaScript
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋Œฏ๐Ÿคญ
@@ -0,0 +1,79 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); + +* { + box-sizing: border-box; +} +body{ + background-color:#fafafa; +} + +.login-wrap{ + width:30%; + height:550px; + background-color:#fff; + border:3px solid rgba(221, 221, 221, 0.3); + margin:130px...
Unknown
๊ณตํ†ต scss๋ฅผ ์ž˜ ํ™œ์šฉํ•ด๋ด์•ผ๊ฒ ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,18 @@ +.recommend-title { + width:100%; + height:40px; + margin-bottom:5px; + + .recommend-title-left { + float:left; + font-size:14px; + color:#888; + font-weight:700; + } + + .recommend-title-right { + float:right; + font-size:12px; + font-...
Unknown
์ œ๋ชฉ ๊น”๋”ํ•˜๊ณ  ์•Œ์•„๋“ฃ๊ธฐ ์‰ฌ์›Œ์„œ ์ข‹์€๊ฑฐ๊ฐ™์•„์š”!
@@ -0,0 +1,98 @@ +import { Component } from "react"; +import { Link, withRouter } from "react-router-dom"; +import "./Login.scss"; + +class Login extends Component { + constructor() { + super(); + this.state = { + id: "", + pw: "", + }; + } + + // localStorage.clear(); + // localStorage.removeIte...
JavaScript
import { Link, withRouter } from "react-router-dom"; ํ•œ์ค„๋กœ ๋งŒ๋“ค์–ด๋„ ์ข‹์„๊ฑฐ๊ฐ™์•„์š”!
@@ -0,0 +1,98 @@ +import { Component } from "react"; +import { Link, withRouter } from "react-router-dom"; +import "./Login.scss"; + +class Login extends Component { + constructor() { + super(); + this.state = { + id: "", + pw: "", + }; + } + + // localStorage.clear(); + // localStorage.removeIte...
JavaScript
๋„ต! ๋ฆฌํŒฉํ† ๋ง ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค๐Ÿ˜„
@@ -0,0 +1,63 @@ +import React from "react"; +import Story from "./Mainleft/Story"; +import Feed from "./Mainleft/Feed"; +import "./MainLeft.scss"; +// import { FaRedditAlien } from "react-icons/fa"; + +class MainLeft extends React.Component { + state = { + feedList: [], + }; + + componentDidMount() { + fetch(...
JavaScript
ํƒœ๊ทธ๋ช…์ด ํ•œ๋ˆˆ์— ๋“ค์–ด์™€์š”๐Ÿ‘
@@ -0,0 +1,50 @@ +@import "../../common.scss"; + +.recommend-header { + width:100%; + height:100px; + @extend %flexbetween; + margin-top:5px; + + li { + position:relative; + &:first-child { + &:after { + width:64px; + height:64px; + bo...
Unknown
tirm ํ•จ์ˆ˜? ์ด์šฉํ•ด์„œ ๋นˆ์นธ enter๋ฐฉ์ง€ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด์žˆ๋”๋ผ๊ตฌ์š” ๊ฐ™์ด ์‚ฌ์šฉํ•ด๋ด์š”๐Ÿ–
@@ -0,0 +1,181 @@ +import React from "react"; +import Comments from "./Comments"; +import COMMENT from "./CommentData"; +import "./Feed.scss"; +import { FaEllipsisH } from "react-icons/fa"; +import { FaRegHeart } from "react-icons/fa"; +import { FaRegComment } from "react-icons/fa"; +import { FaRegShareSquare } from "r...
JavaScript
๋™์‹œ์— ์ด๋ฒคํŠธ๊ฐ€ ์‹คํ–‰๋ ์ˆ˜์žˆ๊ฒŒ ์ €๋„ ์—ฐ์‚ฐ์ž๋กœ ์‚ฌ์šฉํ•ด๋ด์•ผ๊ฒ ์–ด์š”!!
@@ -0,0 +1,88 @@ +@import "../../../../styles/common.scss"; + + +%flexbetween { + display: flex; + align-items: center; + justify-content: space-between; +} + +nav { + width:100%; + height:55px; + background-color:#fff; + border-bottom :1px solid #ddd; + position:fixed; + top:0; + z-index:10; + + ...
Unknown
placeholder ์Šคํƒ€์ผ ๊ฐ’์ฃผ๋Š” ๋ฒ• ์ €๋„ ์จ๋ด์•ผ๊ฒ ์–ด์š”!
@@ -0,0 +1,46 @@ +footer { + width:100%; + height:70px; + + ul { + width:90%; + margin-top:20px; + + li { + font-size:12px; + color:#888; + margin-bottom:10px; + position:relative; + padding-left:5px; + padding-right:10px; +...
Unknown
css์„ ํƒ์ž์™€ ๊ฐ€์ƒ์š”์†Œ์„ ํƒ์ž๋ฅผ ์ž˜ ์ด์šฉํ•˜์…จ๋„ค์š”..! ์ •ํ™•ํ•œ ์ด์šฉ๋ฒ•์„ ๋ชฐ๋ž๋Š”๋ฐ ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค ๐Ÿ”ฅ๐Ÿ‘๐Ÿป
@@ -0,0 +1,50 @@ +@import "../../common.scss"; + +.recommend-header { + width:100%; + height:100px; + @extend %flexbetween; + margin-top:5px; + + li { + position:relative; + &:first-child { + &:after { + width:64px; + height:64px; + bo...
Unknown
afterํ™œ์šฉ ๐Ÿ‘๐Ÿป
@@ -0,0 +1,98 @@ +import { Component } from "react"; +import { Link, withRouter } from "react-router-dom"; +import "./Login.scss"; + +class Login extends Component { + constructor() { + super(); + this.state = { + id: "", + pw: "", + }; + } + + // localStorage.clear(); + // localStorage.removeIte...
JavaScript
ํ•˜๋‚˜์˜ ํ•จ์ˆ˜๋กœ ํ•ฉ์ณ์ฃผ์‹ค์ˆ˜ ์žˆ๊ฒ ๋„ค์š”-! ๐Ÿ‘
@@ -0,0 +1,79 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); + +* { + box-sizing: border-box; +} +body{ + background-color:#fafafa; +} + +.login-wrap{ + width:30%; + height:550px; + background-color:#fff; + border:3px solid rgba(221, 221, 221, 0.3); + margin:130px...
Unknown
ํ•œ์ค„ margin ์†์„ฑ์œผ๋กœ ์ค„์—ฌ๋ณผ ์ˆ˜ ์žˆ๊ฒ ๋„ค์š”-! ๐Ÿ‘
@@ -0,0 +1,98 @@ +import { Component } from "react"; +import { Link, withRouter } from "react-router-dom"; +import "./Login.scss"; + +class Login extends Component { + constructor() { + super(); + this.state = { + id: "", + pw: "", + }; + } + + // localStorage.clear(); + // localStorage.removeIte...
JavaScript
๋”ฐ๋กœ ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“ค์–ด์ฃผ์‹œ์ง€ ์•Š์•„๋„ ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค-! ```js const { id, pw } = this.state; <button className={id.includes('@') && pw.length >= 5 ? 'on' : 'off'} onClick={this.goToMain}> ```
@@ -0,0 +1,79 @@ +@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap'); + +* { + box-sizing: border-box; +} +body{ + background-color:#fafafa; +} + +.login-wrap{ + width:30%; + height:550px; + background-color:#fff; + border:3px solid rgba(221, 221, 221, 0.3); + margin:130px...
Unknown
์ž์ฃผ ์‚ฌ์šฉ๋˜๋Š” ์Šคํƒ€์ผ ๊ฐ™์€๋ฐ, scss ๋ณ€์ˆ˜๋กœ ์„ ์–ธํ•ด์„œ ์‚ฌ์šฉํ•ด์ฃผ์‹œ๋ฉด ์ข‹์„ ๋“ฏ ํ•˜๋„ค์š”-! ๐Ÿ‘
@@ -0,0 +1,63 @@ +import React from "react"; +import Story from "./Mainleft/Story"; +import Feed from "./Mainleft/Feed"; +import "./MainLeft.scss"; +// import { FaRedditAlien } from "react-icons/fa"; + +class MainLeft extends React.Component { + state = { + feedList: [], + }; + + componentDidMount() { + fetch(...
JavaScript
import ์ˆœ์„œ ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š” ๐Ÿ‘ ์ผ๋ฐ˜์ ์ธ convention์„ ๋”ฐ๋ฅด๋Š” ์ด์œ ๋„ ์žˆ์ง€๋งŒ ์ˆœ์„œ๋งŒ ์ž˜ ์ง€์ผœ์ฃผ์…”๋„ ๊ฐ€๋…์„ฑ์ด ์ข‹์•„์ง‘๋‹ˆ๋‹ค. ์•„๋ž˜ ์ˆœ์„œ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”. - React โ†’ Library(Package) โ†’ Component โ†’ ๋ณ€์ˆ˜ / ์ด๋ฏธ์ง€ โ†’ css ํŒŒ์ผ(scss ํŒŒ์ผ)
@@ -0,0 +1,63 @@ +import React from "react"; +import Story from "./Mainleft/Story"; +import Feed from "./Mainleft/Feed"; +import "./MainLeft.scss"; +// import { FaRedditAlien } from "react-icons/fa"; + +class MainLeft extends React.Component { + state = { + feedList: [], + }; + + componentDidMount() { + fetch(...
JavaScript
1. ๋กœ์ปฌ ํ˜ธ์ŠคํŠธ์˜ ๊ฒฝ์šฐ ๋”ฐ๋กœ ์ž…๋ ฅ์„ ํ•ด์ฃผ์ง€ ์•Š์œผ์…”๋„ ์ž๋™์œผ๋กœ ๋“ค์–ด๊ฐ€๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ์ƒ๋žตํ•ด์„œ ์ž‘์„ฑ์„ ํ•ด์ฃผ์‹œ๋Š” ๊ฒŒ ๋” ์ข‹์Šต๋‹ˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด, ํฌํŠธ ๋ฒˆํ˜ธ๊ฐ€ ๋ณ€๊ฒฝ๋˜๋Š” ๋•Œ๊ฐ€ ์ƒ๊ฐ๋ณด๋‹ค ๋งŽ์€๋ฐ, ์ด๋ ‡๊ฒŒ ์ง์ ‘ ์ž‘์„ฑ์„ ํ•ด์ฃผ์‹  ๊ฒฝ์šฐ ํฌํŠธ ๋ฒˆํ˜ธ๋ฅผ ์ผ์ผ์ด ์ˆ˜์ •ํ•ด์ฃผ์‹œ์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ƒ๋žต์„ ํ•ด์„œ ์•„๋ž˜์™€ ๊ฐ™์ด ์ž‘์„ฑํ•  ๊ฒฝ์šฐ, ์ž๋™์œผ๋กœ ๋ณ€๊ฒฝ๋œ ํฌํŠธ๋ฒˆํ˜ธ๊ฐ€ ๋“ค์–ด๊ฐ‘๋‹ˆ๋‹ค ๐Ÿ™Œ ```js fetch(`/data/Story.json`) .then(res => res.json()) .then( ... ) ``` 2. fetch ์˜ ๊ธฐ๋ณธ ๋ฉ”์„œ๋“œ๋Š” GET ์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ { method: 'GET' }...
@@ -1,8 +1,8 @@ export type User = { id: number; - email: string; + email?: string; name: string; - companyName: string; + companyName?: string; image: string | null; }; @@ -13,3 +13,52 @@ export type GatheringParticipant = { joinedAt: string; User: User; }; + +export type ReviewQuery = { + gat...
TypeScript
_:hammer_and_wrench: Refactor suggestion_ **์ค‘๋ณต๋˜๋Š” ํƒ€์ž… ์ •์˜ ํ†ตํ•ฉ ํ•„์š”** `ReviewsResponse`์™€ `ReviewData` ํƒ€์ž…์ด ๋™์ผํ•œ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํƒ€์ž…์„ ํ†ตํ•ฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค: ```diff -// ์‹ค์ œ ๋ฐ์ดํ„ฐ ์‘๋‹ต๊ฐ’ -export type ReviewsResponse = { - data: Review[]; - totalItemCount: number; - currentPage: number; - totalPages: number; -}; - -// ๋ฆฌ๋ทฐ ์ •์ œ ๋ฐ์ดํ„ฐ -exp...
@@ -0,0 +1,54 @@ +import { useMemo } from "react"; +import Arrow from "@/images/arrow.svg"; +import { cn } from "@/utils/classnames"; + +type PaginationProps = { + currentPage: number; + totalPages: number; + onClick: (page: number) => void; + pageLimit?: number; +}; + +export default function Pagination({ currentP...
Unknown
_:hammer_and_wrench: Refactor suggestion_ **๋‹ค์Œ ํŽ˜์ด์ง€ ๊ทธ๋ฃน ๋ฒ„ํŠผ ์ ‘๊ทผ์„ฑ ๊ฐœ์„  ํ•„์š”** ๋‹ค์Œ ํŽ˜์ด์ง€ ๊ทธ๋ฃน ๋ฒ„ํŠผ์—๋„ ์ ์ ˆํ•œ aria ๋ ˆ์ด๋ธ”์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ฐœ์„ ํ•ด๋ณด์„ธ์š”: ```diff <button onClick={() => onClick(currentStartPage + pageLimit)} disabled={currentStartPage + pageLimit > totalPages} + aria-label="๋‹ค์Œ ํŽ˜์ด์ง€ ๊ทธ๋ฃน์œผ๋กœ ์ด๋™" > ...
@@ -0,0 +1,54 @@ +import { useMemo } from "react"; +import Arrow from "@/images/arrow.svg"; +import { cn } from "@/utils/classnames"; + +type PaginationProps = { + currentPage: number; + totalPages: number; + onClick: (page: number) => void; + pageLimit?: number; +}; + +export default function Pagination({ currentP...
Unknown
_:hammer_and_wrench: Refactor suggestion_ **ํŽ˜์ด์ง€ ๋ฒ„ํŠผ ์ ‘๊ทผ์„ฑ ๋ฐ ํ˜„์žฌ ํŽ˜์ด์ง€ ํ‘œ์‹œ ๊ฐœ์„  ํ•„์š”** ํŽ˜์ด์ง€ ๋ฒ„ํŠผ์— ํ˜„์žฌ ํŽ˜์ด์ง€ ํ‘œ์‹œ์™€ aria ์†์„ฑ์ด ๋ถ€์กฑํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ฐœ์„ ํ•ด๋ณด์„ธ์š”: ```diff {pages.map((page) => ( <button key={page} onClick={() => onClick(page)} + aria-label={`${page}ํŽ˜์ด์ง€๋กœ ์ด๋™`} + aria-current={current...
@@ -0,0 +1,54 @@ +import { useMemo } from "react"; +import Arrow from "@/images/arrow.svg"; +import { cn } from "@/utils/classnames"; + +type PaginationProps = { + currentPage: number; + totalPages: number; + onClick: (page: number) => void; + pageLimit?: number; +}; + +export default function Pagination({ currentP...
Unknown
_:hammer_and_wrench: Refactor suggestion_ **์ ‘๊ทผ์„ฑ ๊ฐœ์„  ํ•„์š”** ํŽ˜์ด์ง€๋„ค์ด์…˜ ๋ฒ„ํŠผ์— ์ ์ ˆํ•œ aria ๋ ˆ์ด๋ธ”์ด ์—†์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ ‘๊ทผ์„ฑ์„ ๊ฐœ์„ ํ•ด๋ณด์„ธ์š”: ```diff - <button onClick={() => onClick(currentStartPage - pageLimit)} disabled={currentPage <= pageLimit}> + <button + onClick={() => onClick(currentStartPage - pageLimit)} + disabled...
@@ -1,8 +1,8 @@ export type User = { id: number; - email: string; + email?: string; name: string; - companyName: string; + companyName?: string; image: string | null; }; @@ -13,3 +13,52 @@ export type GatheringParticipant = { joinedAt: string; User: User; }; + +export type ReviewQuery = { + gat...
TypeScript
ReviewData๋Š” ๋ณด๊ธฐ์—๋Š” ReviewsResponse๋ž‘ ๊ฐ™์•„ ๋ณด์ด๋Š”๋ฐ ๋ฌด์Šจ ์šฉ๋„์˜ ํƒ€์ž…์ธ๊ฐ€์š”?
@@ -1,8 +1,8 @@ export type User = { id: number; - email: string; + email?: string; name: string; - companyName: string; + companyName?: string; image: string | null; }; @@ -13,3 +13,52 @@ export type GatheringParticipant = { joinedAt: string; User: User; }; + +export type ReviewQuery = { + gat...
TypeScript
ReviewsResponse๋Š” ์‹ค์ œ ์‘๋‹ต ๋ฐ์ดํ„ฐ ํƒ€์ž…์ด๊ณ  ReviewData๋Š” ์ž„์‹œ๋กœ ํ•ด๋…ผ ๊ฑด๋ฐ ์ง€๊ธˆ ์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง ๋งˆ์น˜๋ฉด ํƒ€์ž… ์ •๋ฆฌํ•  ๊ฒƒ ๊ฐ™์•„์œต..
@@ -1,8 +1,8 @@ export type User = { id: number; - email: string; + email?: string; name: string; - companyName: string; + companyName?: string; image: string | null; }; @@ -13,3 +13,52 @@ export type GatheringParticipant = { joinedAt: string; User: User; }; + +export type ReviewQuery = { + gat...
TypeScript
๋„ต ์•Œ๊ฒ ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,31 @@ +package com.sparta.tentenbackend.domain.ai.entity; + +import com.sparta.tentenbackend.global.BaseEntity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +impo...
Java
GenerationbType.AUTO๋ณด๋‹ค GenerationbType.UUID๋กœ ๋ช…์‹œ์ ์œผ๋กœ ํ•˜๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”!
@@ -0,0 +1,34 @@ +package com.sparta.tentenbackend.domain.review.entity; + +import com.sparta.tentenbackend.global.BaseEntity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +...
Java
์š” ๋ถ€๋ถ„๋„ GenerationType.UUID๋กœ ๊ณ ์น˜๋Š”๊ฒŒ ๋‚˜์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,43 @@ +package nextstep.app; + +import nextstep.oauth2.authentication.provider.OAuth2LoginAuthenticationProvider; +import nextstep.oauth2.registration.ClientRegistrationRepository; +import nextstep.oauth2.registration.OAuth2ClientProperties; +import nextstep.oauth2.userinfo.OAuth2UserService; +import nextste...
Java
์ปค์Šคํ…€์„ ํ•˜๊ฒŒ ๋˜๊ฒ ์ง€๋งŒ DefaultOAuth2UserService๋ฅผ ๋‘์–ด์„œ ํ•„์š”ํ•œ ๋กœ์ง๋งŒ ์ถ”๊ฐ€๋กœ ๊ตฌํ˜„ํ•ด๋ณด๋Š” ๊ตฌ์กฐ๋กœ ํ•ด๋ณด์‹œ๋ฉด ์–ด๋–จ๊นŒ์š”?
@@ -0,0 +1,68 @@ +package nextstep.oauth2.authentication.token; + +import nextstep.oauth2.authentication.OAuth2AccessToken; +import nextstep.oauth2.endpoint.dto.OAuth2AuthorizationExchange; +import nextstep.oauth2.registration.ClientRegistration; +import nextstep.security.authentication.Authentication; + +import java.u...
Java
authorizationCodeAuthentication๋ฅผ ์‚ดํŽด๋ณด๋ฉด Authentication์˜ getCredentials๋‚˜ getPrincipal๋ฅผ ๋ณ„๋„๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์ง€ ์•Š์€๋ฐ ์™œ ๊ตณ์ด Authentication๋ฅผ ๊ตฌํ˜„ํ•˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ผ ์ง€ ์ƒ๊ฐํ•ด๋ณด์…จ๋‚˜์š”? ์ •๋‹ต์ด ์žˆ๊ฑฐ๋‚˜ ๋ฌด์–ธ๊ฐ€๋ฅผ ์˜๋„ํ•˜๋Š” ์งˆ๋ฌธ์€ ์•„๋‹ˆ๊ณ  ์ƒ๊ฐํ•ด๋ณด์‹œ๊ธธ ๋ฐ”๋ผ๋Š” ๋งˆ์Œ์—์„œ ๋‚จ๊ธฐ๋Š” ์ฝ”๋ฉ˜ํŠธ ์ž…๋‹ˆ๋‹ค!
@@ -0,0 +1,43 @@ +package nextstep.app; + +import nextstep.oauth2.authentication.provider.OAuth2LoginAuthenticationProvider; +import nextstep.oauth2.registration.ClientRegistrationRepository; +import nextstep.oauth2.registration.OAuth2ClientProperties; +import nextstep.oauth2.userinfo.OAuth2UserService; +import nextste...
Java
๋ฏธ์…˜์„ ์ง„ํ–‰ํ•  ๋•Œ, oauth2 ํŒจํ‚ค์ง€๋งŒ ํ•ด๋„ ๋‹ค๋ฃจ์–ด์•ผํ•  ๊ฒŒ ๋ฌด์ฒ™ ๋งŽ๋‹ค๋ณด๋‹ˆ, app ํŒจํ‚ค์ง€์—์„œ์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ์ตœ์†Œํ™”ํ•˜๊ณ , ๋งŒ์•ฝ ์ถ”๊ฐ€ ํด๋ž˜์Šค๋ฅผ ๊ตฌํ˜„ํ• ๊ฒŒ ์žˆ๋‹ค๋ฉด ์ตœ๋Œ€ํ•œ OAuth2Config ๋‚ด๋ถ€์—์„œ ํ•ด๊ฒฐํ•˜๋ ค๋‹ค๋ณด๋‹ˆ ์ด๋ ‡๊ฒŒ Bean ๋“ฑ๋ก์„ ํ•˜๊ฒŒ ๋œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. DefaultOAuth2UserService ๋ฅผ ๋ณ„๋„ ํด๋ž˜์Šค๋กœ ๋ถ„๋ฆฌ์‹œํ‚ค๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,43 @@ +package nextstep.app; + +import nextstep.oauth2.authentication.provider.OAuth2LoginAuthenticationProvider; +import nextstep.oauth2.registration.ClientRegistrationRepository; +import nextstep.oauth2.registration.OAuth2ClientProperties; +import nextstep.oauth2.userinfo.OAuth2UserService; +import nextste...
Java
[5d68d0d](https://github.com/next-step/spring-security-oauth2/pull/8/commits/5d68d0dc640af2e1fd53ebca1cc7b8a5ed58d3ec) ์ปค๋ฐ‹์—์„œ ๋ฐ˜์˜ ์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,68 @@ +package nextstep.oauth2.authentication.token; + +import nextstep.oauth2.authentication.OAuth2AccessToken; +import nextstep.oauth2.endpoint.dto.OAuth2AuthorizationExchange; +import nextstep.oauth2.registration.ClientRegistration; +import nextstep.security.authentication.Authentication; + +import java.u...
Java
[spring-security ์˜ OAuth2AuthorizationCodeAuthenticationToken ์†Œ์Šค์ฝ”๋“œ๋ฅผ ๋ณด๋ฉด](https://github.com/spring-projects/spring-security/blob/7fc5d50adfe5546ca725f3259e4d65ee6083f7cd/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/authentication/OAuth2AuthorizationCodeAuthenticationToken.java#L112) pri...
@@ -0,0 +1,68 @@ +package nextstep.oauth2.authentication.token; + +import nextstep.oauth2.authentication.OAuth2AccessToken; +import nextstep.oauth2.endpoint.dto.OAuth2AuthorizationExchange; +import nextstep.oauth2.registration.ClientRegistration; +import nextstep.security.authentication.Authentication; + +import java.u...
Java
์ €๋Š” ํ•ด๋‹น ๋ถ€๋ถ„์„ ๊ณ ๋ฏผํ•˜๋ฉด์„œ ๋“ค์—ˆ๋˜ ์ƒ๊ฐ์€ ์ธ์ฆ ๊ณผ์ •์—์„œ ํ•„์š”ํ•œ ๊ฐ์ฒด์ž„์„ ๋“œ๋Ÿฌ๋‚ด๊ธฐ์œ„ํ•ด Authentication์„ ๊ตฌํ˜„ํ•œ ๊ฒƒ์ด๋ผ ์ƒ๊ฐํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค. ์ •์™„๋‹˜์˜ ํžˆ์Šคํ† ๋ฆฌ ์ถ”์ ์„ ์‚ดํŽด๋ณด๋‹ˆ ์ผ๋ฆฌ๊ฐ€ ์žˆ์–ด ๋ณด์ด๋„ค์š” ๐Ÿ‘
@@ -0,0 +1,58 @@ +package nextstep.app.service; + +import nextstep.app.domain.Member; +import nextstep.app.domain.MemberRepository; +import nextstep.oauth2.profile.OAuth2ProfileUser; +import nextstep.oauth2.userinfo.OAuth2User; +import nextstep.oauth2.userinfo.OAuth2UserRequest; +import nextstep.oauth2.userinfo.OAuth2U...
Java
๋ฐ˜์˜ ์ž˜ ํ•ด์ฃผ์…จ์Šต๋‹ˆ๋‹ค! DefaultOAuth2UserService์—์„œ ์ œ๊ณตํ•ด์ฃผ๋Š” ๊ฒƒ ์™ธ์— ์ปค์Šคํ…€์ด ํ•„์š”ํ•œ ๋ถ€๋ถ„์€ ์–ด๋–ค ๋ถ€๋ถ„์ธ์ง€ ํ™•์ธํ•ด๋ณด๊ณ  ๊ตฌํ˜„์„ ํ•ด๋ณด๋ฉด ์ถ”ํ›„ ์Šคํ”„๋ง ์‹œํ๋ฆฌํ‹ฐ๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ์กฐ๊ธˆ ๋” ์ƒ‰๋‹ค๋ฅด๊ฒŒ ๋‹ค๊ฐ€์˜ฌ ๊ฒƒ ๊ฐ™๋„ค์š” :) ์–ด๋–ค ๋ถ€๋ถ„์ด ์žˆ์„ ์ง€ ๊ณ ๋ฏผ๋งŒ ํ•ด๋ณด์…”์š”~
@@ -0,0 +1,65 @@ +import History from "@models/History"; +import { + getHistoryItemTemplate, + NO_HISTORY_TEMPLATE, +} from "@templates/history"; + +export default class HistoryController { + constructor(historyContainer) { + this.historyContainer = historyContainer; + this.numberOfHistory = 0; + this._init...
JavaScript
๐Ÿ‘ ๐Ÿ‘ ๋ฆฌ๋ทฐ๋“œ๋ฆฐ ๋ถ€๋ถ„ ๋ฐ˜์˜ํ•ด์ฃผ์…จ๋„ค์š”~! ํ™•์‹คํžˆ ํ…œํ”Œ๋ฆฟ์„ ์ƒ์ˆ˜๋กœ ๋ถ„๋ฆฌํ•˜๋‹ˆ๊นŒ ๊ฐ€๋…์„ฑ์ด ์ข‹์•„์กŒ๋„ค์š” :)
@@ -19,41 +19,56 @@ export default class Repo { }) { this.id = id; this.name = name; - this.full_name = full_name; + this.fullName = full_name; this.owner = owner; - this.html_url = html_url; + this.htmlUrl = html_url; this.description = description; - this.stargazers_count = starg...
JavaScript
`models/User.js` ์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์ด๋ฏธ์ง€์—๋Š” alt๊ฐ€ ํ•œ๊ธ€๋กœ ๋˜์–ด์žˆ๋Š”๋ฐ ์ด๋ถ€๋ถ„์€ ์˜์–ด๋กœ ๋˜์–ด์žˆ๋„ค์š”! ํ†ต์ผ์‹œ์ผœ์ฃผ๋Š” ๊ฒƒ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”~
@@ -1,83 +1,112 @@ import GithubApiController from "@controllers/githubController"; import User from "@models/User"; +import { + NO_SEARCH_RESULT_TEMPLATE, + SEARCH_LOADING_TEMPLATE, + getReposTemplate, + NO_REPOS_TEMPLATE, +} from "@templates/search"; +import { SPINNER_TEMPLATE } from "@templates/spinner"; +impo...
JavaScript
๊ฐœ์ธ์ ์ธ ์ƒ๊ฐ์œผ๋ก  ํ•จ์ˆ˜๋ช…์ด `getXXXEl`๋กœ ๋˜์–ด์žˆ์–ด์„œ ๊ธฐ์กด์— ์กด์žฌํ•˜๋Š” ์—˜๋ ˆ๋จผํŠธ๋ฅผ ์ฟผ๋ฆฌ์…€๋ ‰ํŠธ๋กœ ๊ฐ€์ ธ์˜ค๋Š” ๊ฒƒ ๊ฐ™์€ ๋А๋‚Œ์ด ์žˆ๋Š”๋ฐ์š”, ์ƒˆ๋กœ์šด ์—˜๋ ˆ๋จผํŠธ๋ฅผ ๋งŒ๋“ค์–ด์„œ ๋ฐ˜ํ™˜ํ•˜๋Š” ์—ญํ• ์„ ํ•ด์ฃผ๊ณ  ์žˆ์œผ๋‹ˆ `get` ๋Œ€์‹  `create`๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ๋„ค์ด๋ฐํ•ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™๋„ค์š” :)
@@ -1,83 +1,112 @@ import GithubApiController from "@controllers/githubController"; import User from "@models/User"; +import { + NO_SEARCH_RESULT_TEMPLATE, + SEARCH_LOADING_TEMPLATE, + getReposTemplate, + NO_REPOS_TEMPLATE, +} from "@templates/search"; +import { SPINNER_TEMPLATE } from "@templates/spinner"; +impo...
JavaScript
์ง€๋‚œ๋ฒˆ์— `keyCode`๋กœ ์ฒ˜๋ฆฌํ–ˆ์„ ๋•Œ ๋ณด๋‹ค ์–ด๋–ค ํ‚ค๋ฅผ ๋ˆŒ๋ €์„ ๋•Œ ๋™์ž‘ํ•˜๋Š” ๋กœ์ง์ธ์ง€ ํŒŒ์•…ํ•˜๊ธฐ๊ฐ€ ์‰ฌ์›Œ์กŒ๋„ค์š” ๐Ÿ‘
@@ -0,0 +1,65 @@ +import History from "@models/History"; +import { + getHistoryItemTemplate, + NO_HISTORY_TEMPLATE, +} from "@templates/history"; + +export default class HistoryController { + constructor(historyContainer) { + this.historyContainer = historyContainer; + this.numberOfHistory = 0; + this._init...
JavaScript
์ง€์–ด์ฃผ์‹  ๋ณ€์ˆ˜๋ช…๋„ ์ถฉ๋ถ„ํžˆ ์˜๋ฏธํŒŒ์•…์ด ์ž˜๋˜๋Š”๋ฐ์š”! ํ˜น์‹œ ์ข€๋” ๊ฐ„๊ฒฐํ•œ ๋ณ€์ˆ˜๋ช…์„ ์›ํ•˜์‹ ๋‹ค๋ฉด `historyCount` ๋กœ ๋„ค์ด๋ฐํ•˜๋Š” ๋ฐฉ๋ฒ•๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ใ…Žใ…Ž
@@ -1,11 +1,13 @@ import Repo from "@models/Repo"; +import { getDateDiff } from "@utils/dateUtils"; export default class User { constructor({ id, avatar_url, created_at, email, + bio, followers, following, login, @@ -22,57 +24,114 @@ export default class User { this.id ...
JavaScript
`loginId` ๋งŒ ์นด๋ฉœ์ผ€์ด์Šค๋กœ ์ •์˜ ๋˜์–ด์žˆ๋„ค์š”! ๋ณ€์ˆ˜๋ช… ํ‘œ๊ธฐ๋ฒ•์„ ํ†ต์ผ์‹œํ‚ค๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”
@@ -19,41 +19,56 @@ export default class Repo { }) { this.id = id; this.name = name; - this.full_name = full_name; + this.fullName = full_name; this.owner = owner; - this.html_url = html_url; + this.htmlUrl = html_url; this.description = description; - this.stargazers_count = starg...
JavaScript
๊ทธ ๋ถ€๋ถ„์€ ์‹ ๊ฒฝ์“ฐ์ง€ ๋ชปํ–ˆ๋„ค์š”! ํ•œ๊ตญ ์„œ๋น„์Šค์—์„œ๋Š” alt๋„ ํ•œ๊ธ€๋กœ ์ ์–ด์ฃผ๋Š”๊ฒŒ ๋” ๋‚˜์„๊นŒ์š”?
@@ -1,83 +1,112 @@ import GithubApiController from "@controllers/githubController"; import User from "@models/User"; +import { + NO_SEARCH_RESULT_TEMPLATE, + SEARCH_LOADING_TEMPLATE, + getReposTemplate, + NO_REPOS_TEMPLATE, +} from "@templates/search"; +import { SPINNER_TEMPLATE } from "@templates/spinner"; +impo...
JavaScript
๊ธฐ์กด vs ์ƒˆ๋กœ ์ƒ์„ฑ์€ ๋‹ค๋ฅธ ๊ฒฝ์šฐ๋‹ˆ๊นŒ create๊ฐ€ ๋” ๋ช…ํ™•ํ•˜๊ฒ ๋„ค์š” :)
@@ -0,0 +1,65 @@ +import History from "@models/History"; +import { + getHistoryItemTemplate, + NO_HISTORY_TEMPLATE, +} from "@templates/history"; + +export default class HistoryController { + constructor(historyContainer) { + this.historyContainer = historyContainer; + this.numberOfHistory = 0; + this._init...
JavaScript
๊ฐ„๊ฒฐํ•œ ๋ฒ„์ „๋„ ๊ดœ์ฐฎ๊ตฐ์š” ใ…Žใ…Ž
@@ -1,11 +1,13 @@ import Repo from "@models/Repo"; +import { getDateDiff } from "@utils/dateUtils"; export default class User { constructor({ id, avatar_url, created_at, email, + bio, followers, following, login, @@ -22,57 +24,114 @@ export default class User { this.id ...
JavaScript
๊ฐ์ฒด ํ”„๋กœํผํ‹ฐ๋ฅผ ๋ณต์‚ฌํ•ด์˜ค๋Š” ๊ณผ์ •์—์„œ ๋‹ค๋ฅธ ๋ถ€๋ถ„์€ ์‹ ๊ฒฝ์„ ์“ฐ์ง€ ๋ชปํ–ˆ๋„ค์š”...! ํ†ต์ผ ์‹œ์ผœ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค
@@ -19,41 +19,56 @@ export default class Repo { }) { this.id = id; this.name = name; - this.full_name = full_name; + this.fullName = full_name; this.owner = owner; - this.html_url = html_url; + this.htmlUrl = html_url; this.description = description; - this.stargazers_count = starg...
JavaScript
๋„ต~ ์ œ๊ฐ€ ์ง€๊ธˆ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” ํ”„๋กœ์ ํŠธ์˜ ๊ฒฝ์šฐ ๋‹ค ํ•œ๊ธ€๋กœ alt ์ ์–ด์ฃผ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค!
@@ -19,41 +19,56 @@ export default class Repo { }) { this.id = id; this.name = name; - this.full_name = full_name; + this.fullName = full_name; this.owner = owner; - this.html_url = html_url; + this.htmlUrl = html_url; this.description = description; - this.stargazers_count = starg...
JavaScript
์•„ํ•˜! ์ฐธ๊ณ ํ•ด์„œ ์ง„ํ–‰ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~
@@ -1,70 +1,10 @@ -# Getting Started with Create React App +# React Westagram 3ํŒ€ -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +instagram์„ ๋ชจํ‹ฐ๋ธŒ๋กœ ํ•œ ํด๋ก  ํŒ€ ํ”„๋กœ์ ํŠธ -## Available Scripts +# ํŒ€์› -In the project directory, you can run: - -### `npm start` - -Runs the app...
Unknown
๐Ÿ‘ README.md ํŒŒ์ผ ์ˆ˜์ •ํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ^^
@@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import "./Login.scss"; + +const Login = () => { + const navigate = useNavigate(); + const [showErrorMessage, setShowErrorMessage] = useState(false); + + const [userInfo, setUserInfo] = useState({ +...
Unknown
๋” ์ด์ƒ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ๋ถˆํ•„์š”ํ•œ ์ฝ”๋“œ์— ๋Œ€ํ•œ ์ฃผ์„์€ ๊ผญ ์‚ญ์ œํ•ด์ฃผ์„ธ์š”
@@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import "./Login.scss"; + +const Login = () => { + const navigate = useNavigate(); + const [showErrorMessage, setShowErrorMessage] = useState(false); + + const [userInfo, setUserInfo] = useState({ +...
Unknown
์ฝ˜์†”๋„ ๋งˆ์ฐฌ๊ฐ€์ง€์ž…๋‹ˆ๋‹ค ํ…Œ์ŠคํŠธ๊ฐ€ ๋๋‚œ ์ฝ”๋“œ๋Š” ํ•ญ์ƒ ์ง€์›Œ์ฃผ์„ธ์š”! ์•„๋ž˜์— ๋‚จ์•„์žˆ๋Š” ๋ชจ๋“  ์ฝ˜์†”์€ ์‚ญ์ œ ํ•ด์ฃผ์„ธ์š”
@@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import "./Login.scss"; + +const Login = () => { + const navigate = useNavigate(); + const [showErrorMessage, setShowErrorMessage] = useState(false); + + const [userInfo, setUserInfo] = useState({ +...
Unknown
๐Ÿ‘ useEffect ๊นŒ์ง€ ํ™œ์šฉํ•ด๋ณด์…จ๊ตฐ์š”! condition ๋ณ€์ˆ˜๊ฐ€ userInfo๋ผ๋Š” state๋ฅผ ์ด๋ฏธ ์ฐธ์กฐํ•œ ๊ฐ’์ด๊ธฐ๋•Œ๋ฌธ์— isActive๋ผ๋Š” ๊ฐ’์„ ๋”ฐ๋กœ state๋กœ ๊ด€๋ฆฌํ•˜์ง€์•Š์•„๋„ condition ๋ณ€์ˆ˜๊ฐ€ ์ฐธ์กฐํ•˜๊ณ ์žˆ๋Š” ๊ฐ’์ด ์ด๋ฏธ state๋ผ์„œ state๋ณ€ํ™”์— ๋”ฐ๋ผ ์ฆ‰๊ฐ์ ์œผ๋กœ ๋‹ค๋ฅธ ๊ฐ’์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. isActive๋ฅผ state๊ฐ€ ์•„๋‹Œ ์ผ๋ฐ˜๋ณ€์ˆ˜๋กœ ๊ด€๋ฆฌํ•ด๋ณด์‹œ๋Š”๊ฒŒ ์–ด๋–จ๊นŒ์š”?
@@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import "./Login.scss"; + +const Login = () => { + const navigate = useNavigate(); + const [showErrorMessage, setShowErrorMessage] = useState(false); + + const [userInfo, setUserInfo] = useState({ +...
Unknown
๐Ÿ‘ ์กฐ๊ฑด๋ถ€๋žœ๋”๋ง ํ™œ์šฉํ•ด๋ณด์…จ๊ตฐ์š”!! ์˜คํžˆ๋ ค showErrorMessage๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํ•จ์ˆ˜๋ฅผ useEffectํ•จ์ˆ˜ ๋‚ด์—์„œ ์„ ์–ธํ•œ condition๊ฐ’์— ๋”ฐ๋ผ ๋‹ค๋ฅด๊ฒŒ ๊ด€๋ฆฌํ•ด๋ณผ ์ˆ˜ ์žˆ๊ฒ ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,144 @@ +.login { + width: 100%; + height: 100vh; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + .box { + padding: 25px 40px; + display: flex; + flex-direction: column; + align-items: center; + width: 100%; + max-width: 350px; + box...
Unknown
์›นํฐํŠธ ๊ฐ™์€๊ฒฝ์šฐ๋Š” index.htmlํŒŒ์ผ์—์„œ ์ถ”๊ฐ€ํ•  ์ˆ˜๋„ ์žˆ๊ณ  common.scss์—์„œ ๊ด€๋ฆฌํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,160 @@ +import React from "react"; +import "./Main.scss"; +import { Link, useNavigate } from "react-router-dom"; + +const Main = () => { + const navigate = useNavigate(); + + const goToMain = () => { + navigate("/jisun-main"); + }; + + return ( + <div className="main"> + <nav> + <Link t...
Unknown
reset.scss ํŒŒ์ผ๋„ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์ „์—ญ์—์„œ ์ ์šฉ๋˜์–ด์•ผ ํ•˜๋Š” ํŒŒ์ผ์ž„์œผ๋กœ index.js์—์„œ importํ•ด ์˜ค๋Š”๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,160 @@ +import React from "react"; +import "./Main.scss"; +import { Link, useNavigate } from "react-router-dom"; + +const Main = () => { + const navigate = useNavigate(); + + const goToMain = () => { + navigate("/jisun-main"); + }; + + return ( + <div className="main"> + <nav> + <Link t...
Unknown
์•„์ด์ฝ˜๋“ค์„ ๋ˆŒ๋ €์„๋•Œ ํŠน์ •ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ด์•ผํ•˜๋Š”๊ฒƒ์ด ์•„๋‹ˆ๋ผ๋ฉด a ํƒœ๊ทธ๋‚˜ Link ํƒœ๊ทธ๊ฐ€ ์•„๋‹Œ ์—ฌํƒ€ ๋‹ค๋ฅธํƒœ๊ทธ๋ฅผ ํ™œ์šฉํ•ด์„œ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,160 @@ +import React from "react"; +import "./Main.scss"; +import { Link, useNavigate } from "react-router-dom"; + +const Main = () => { + const navigate = useNavigate(); + + const goToMain = () => { + navigate("/jisun-main"); + }; + + return ( + <div className="main"> + <nav> + <Link t...
Unknown
ํ•ด๋‹น ์ƒ๋Œ€๊ฒฝ๋กœ๊ฐ€ publicํด๋”๋ฅผ ์ฐธ๊ณ ํ•˜๋Š”๊ฑฐ๋ผ๋ฉด ```suggestion <img alt="๊ณ„์ • ํ”„๋กœํ•„ ์‚ฌ์ง„" src="/images/jisun/img_profile.png" /> ``` ์ด๋ ‡๊ฒŒ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,160 @@ +import React from "react"; +import "./Main.scss"; +import { Link, useNavigate } from "react-router-dom"; + +const Main = () => { + const navigate = useNavigate(); + + const goToMain = () => { + navigate("/jisun-main"); + }; + + return ( + <div className="main"> + <nav> + <Link t...
Unknown
className์ด ๋„ˆ๋ฌด ๋ชจํ˜ธํ•ฉ๋‹ˆ๋‹ค!! ์–ด๋–ค ์•„์ด์ฝ˜์ธ์ง€ ์•Œ๋ ค์ฃผ์„ธ์š”