code
stringlengths
41
34.3k
lang
stringclasses
8 values
review
stringlengths
1
4.74k
@@ -0,0 +1,122 @@ +package nextstep.security.access; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Set; +import nextstep.security.core.GrantedAuth...
Java
```suggestion } if (roleName.equals(lowerRole.getAuthority())) { throw new RuntimeException(); } ``` else if๊ฐ€ ๊ฐ€๋…์„ฑ์ด ๋†’๋‹ค๋Š” ์˜๊ฒฌ์ด ์žˆ์„ ์ˆ˜ ์žˆ์ง€๋งŒ ๊ฐœ์ธ์ ์œผ๋กœ๋Š” if ํ›„์˜ else, else if๋Š” ์ปจํ…์ŠคํŠธ๋ฅผ ๊ณ„์† ๋“ค๊ณ  ์ฝ”๋“œ๋ฅผ ์ฝ๊ฒŒ ๋งŒ๋“œ๋Š” ์›์ธ์ด๋ผ ๊ทธ๋ƒฅ if ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ๋” ๋‚ซ๋‹ค๋Š” ์ƒ๊ฐ์ž…๋‹ˆ๋‹ค.
@@ -0,0 +1,13 @@ +package nextstep.security.access; + +import java.util.Collection; +import nextstep.security.core.GrantedAuthority; + +public final class NullRoleHierarchy implements RoleHierarchy { + + @Override + public Collection<GrantedAuthority> getReachableGrantedAuthorities( + Collection<Grante...
Java
๊ธฐ์กด ์Šคํ”„๋ง์‹œํ๋ฆฌํ‹ฐ ์ฝ”๋“œ์—์„œ ๊ฐ€์ ธ์˜จ ๋ถ€๋ถ„์ธ๋ฐ, ์ƒ๊ฐํ•ด๋ณด๋‹ˆ ์ €ํฌ ๊ตฌ์กฐ์—์„  ๋ถˆํ•„์š”ํ•˜๋„ค์š”,, ์ˆ˜์ •ํ•ด๋‘๊ฒ ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,93 @@ +package nextstep.security.access; + +import nextstep.security.core.GrantedAuthority; +import nextstep.security.core.SimpleGrantedAuthority; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import java.util.Collection; +import java.util.Set; + +import static org.assertj...
Java
์ˆœํ™˜์ฐธ์กฐ ์˜ˆ์™ธ ํ…Œ์ŠคํŠธ๊นŒ์ง€ ์ž˜ ์ถ”๊ฐ€ํ•ด์ฃผ์…จ๋„ค์š” ๐Ÿ‘
@@ -0,0 +1,93 @@ +package nextstep.security.access; + +import nextstep.security.core.GrantedAuthority; +import nextstep.security.core.SimpleGrantedAuthority; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import java.util.Collection; +import java.util.Set; + +import static org.assertj...
Java
ํ…Œ์ŠคํŠธ๊ฐ€ 27์—์„œ ์‹คํŒจํ•ด๋„ 28๋ผ์ธ์— ๋Œ€ํ•œ assertion๊นŒ์ง€ ํ”ผ๋“œ๋ฐฑ๋ฐ›์„ ์ˆ˜ ์žˆ๊ฒŒ `assertAll`๋ฅผ ํ™œ์šฉํ•ด ๋ณผ ์ˆ˜๋„ ์žˆ๊ฒ ๋„ค์š” :)
@@ -1,5 +1,98 @@ import React from 'react'; +import { useState, useEffect } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './Login.scss'; -export default function Login() { - return <div>Hello, Hyeonze!</div>; -} +const Login = () => { + const [idInput, setIdInput] = useState(''); + const...
Unknown
์ด ๋‘ ์กฐ๊ฑด์„ &&๋กœ ๊ฑธ๋ฉด state๋ฅผ ํ•˜๋‚˜๋งŒ ์‚ฌ์šฉํ•˜๊ณ  validation์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ์š”? ์™œ ์œ ์ฆˆ์ดํŽ™ํŠธ๋ฅผ ์“ฐ์…จ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.
@@ -1,5 +1,98 @@ import React from 'react'; +import { useState, useEffect } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './Login.scss'; -export default function Login() { - return <div>Hello, Hyeonze!</div>; -} +const Login = () => { + const [idInput, setIdInput] = useState(''); + const...
Unknown
id์™€ pw๋กœ ํ•œ๋ฒˆ์— validationํ•˜๊ณ  activateBtn์— True/false๋ฅผ ์ง€์ •ํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. isValidatedId๋‚˜ isValidatedPw๋Š” ํฌ๊ฒŒ ํ•„์š”ํ•˜์ง€ ์•Š์„ ๊ฒƒ ๊ฐ™์•„์š”. ๋ถˆํ•„์š”ํ•œ ๋ฆฌ๋žœ๋”๋ง๋„ ์ค„์ผ ์ˆ˜ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š”๋ฐ ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์‹œ๋‚˜์š”?
@@ -0,0 +1,66 @@ +@use '../../../styles/mixin.scss' as mixin; +@use '../../../styles/color.scss' as clr; + +body { + background: clr.$bg-login; + + .login { + position: relative; + top: -80px; + + #wrapper { + @include mixin.flex($align: center); + position: relative; + flex-direction: column;...
Unknown
input์ด inline-block์ด๊ณ  ์ˆ˜์ง์œผ๋กœ ์ •๋ ฌํ•˜๋ ค๊ณ  display: flex๋ฅผ ์“ฐ์‹  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ต‰์žฅํžˆ ์ข‹์€๋ฐ์š” ์ €๋Š” Input์„ display: blockํ•ด์ฃผ๋Š” ๊ฒƒ๋„ ๊ดœ์ฐฎ์€ ๋ฐฉ๋ฒ•์ด์ง€ ์•Š์„๊นŒ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.
@@ -0,0 +1,66 @@ +@use '../../../styles/mixin.scss' as mixin; +@use '../../../styles/color.scss' as clr; + +body { + background: clr.$bg-login; + + .login { + position: relative; + top: -80px; + + #wrapper { + @include mixin.flex($align: center); + position: relative; + flex-direction: column;...
Unknown
'๋กœ๊ทธ์ธ' ์ด๋ผ๋Š” ๊ธ€์ž ์„ผํ„ฐ์— ๋งž์ถ”๊ธฐ ์œ„ํ•ด display: flex์ฃผ์‹  ๊ฒƒ ๊ฐ™์•„์š”. ์ข‹์€๋ฐฉ๋ฒ•์ด์ง€๋งŒ flex์™€ ๊ทธ ์†์„ฑ๋“ค์ด ์ข€ ๋–จ์–ด์ ธ ์žˆ๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ์—ฐ๊ด€๋˜๋Š” css์†์„ฑ์€ ๋ถ™์—ฌ ์ฃผ์‹œ๋Š” ๊ฒŒ ๋‚˜์ค‘์— ์œ ์ง€๋ณด์ˆ˜ ์ธก๋ฉด์—์„œ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„ ์ถ”์ฒœ ๋“œ๋ฆฝ๋‹ˆ๋‹ค!
@@ -0,0 +1,26 @@ +import React, { useState } from 'react'; +import { AiFillDelete, AiOutlineHeart, AiFillHeart } from 'react-icons/ai'; + +const Comment = ({ id, userId, value, time, handleDelete }) => { + const [isLiked, setIsLiked] = useState(false); + + const toggleLike = () => { + setIsLiked(!isLiked); + }; +...
Unknown
์ €๋ฒˆ ์„ธ์…˜์—์„œ ๋ฉ˜ํ† ๋‹˜์ด ํ•˜์‹  ๊ฒƒ์ฒ˜๋Ÿผ ๋ณ€์ˆ˜๋ช…์„ ์กฐ๊ธˆ ๋” ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ค ๋‚ด์šฉ์„ ๋‹ด๊ณ  ์žˆ๋Š”์ง€๋ฅผ ์ž‘์„ฑํ•ด ์ฃผ์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. commentVal์ด ๋Œ“๊ธ€ ์ „์ฒด๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๋ฐฐ์—ด์ด๊ณ  el์ด ๊ฐ ๋ฐฐ์—ด์˜ ์š”์†Œ์ด๋‹ˆ๊น commentVal๋Œ€์‹  allComments, el๋Œ€์‹  comment๋“ฑ์œผ๋กœ (์ด๊ฑด ์ €๋„ ์กฐ๊ธˆ ์• ๋งคํ•˜๋„ค์š” .. ์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค) (๋ฐฐ์—ด์€ s๋ฅผ ๋ถ™์ธ ๋ณ€์ˆ˜๋ช…์œผ๋กœ ํ•˜๋Š” ๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!)
@@ -0,0 +1,43 @@ +span.comment { + padding-left: 10px; + + small { + color: #a3a3a3; + } + + &:first-child { + padding: 10px; + font-weight: bold; + } + + svg { + &.delete { + display: none; + cursor: pointer; + } + + &.hearts { + color: #a3a3a3; + position: absolute; + ...
Unknown
span์— ๋Œ€ํ•ด์„œ๋งŒ ์Šคํƒ€์ผ๋ง์„ ํ•ด์ฃผ์…จ๋Š”๋ฐ ์ด๋Ÿฌ๋ฉด ๋‹ค๋ฅธ ์ปดํฌ๋„ŒํŠธ์˜ span์—๋„ ์˜ํ–ฅ์ด ๊ฐ€์ง€ ์•Š์„๊นŒ ์กฐ์‹ฌ์Šค๋Ÿฝ๊ฒŒ ์ƒ๊ฐํ•ด ๋ด…๋‹ˆ๋‹ค. ๊ฐœ์ธ์ ์œผ๋กœ className์„ ์ฃผ๋Š” ๊ฒŒ ์กฐ๊ธˆ ๋” ์•ˆ์ „ํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ์ถ”๊ฐ€์ ์œผ๋กœ svgํƒœ๊ทธ๋„ span ๋‚ด๋ถ€์— nestingํ•ด์ฃผ์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”. ``` svg { &.red {} &.blue {} } ```
@@ -0,0 +1,87 @@ +import React, { useState } from 'react'; +import { AiFillHeart, AiOutlineComment, AiOutlineUpload } from 'react-icons/ai'; +import { BiDotsHorizontalRounded } from 'react-icons/bi'; +import { GrBookmark } from 'react-icons/gr'; +import './Feeds.scss'; +import Comments from './Comment/Comments'; + +exp...
Unknown
๊ต‰์žฅํžˆ ์ž˜ ์งœ์‹  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!! ๐Ÿ‘ ๊ทธ๋Ÿฐ๋ฐ ์ˆœ์„œ๊ฐ€ ์กฐ๊ธˆ ์• ๋งคํ•œ ๊ฒƒ ๊ฐ™์•„์š”. 17)์—์„œ uploadComment ํ˜ธ์ถœ์„ ํ•˜๊ณ  31)์—์„œ currInputVal( " " ) -> 18 ) ์—์„œ currInputVal( e.target.value ) ์ˆœ์œผ๋กœ ์ง„ํ–‰์ด ๋œ๋‹ค๋ฉด ๋Œ“๊ธ€์„ ์ถ”๊ฐ€ํ•˜๋”๋ผ๋„ input์€ ๋น„์›Œ์ง€์ง€ ์•Š์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,101 @@ +@use '../../../../styles/mixin.scss' as mixin; +@use '../../../../styles/color.scss' as clr; + +.feeds { + position: relative; + top: 77px; + width: 60%; + margin-bottom: 80px; + background: #fff; + + .top_menu { + @include mixin.flex($justify: space-between, $align: center); + height: 82...
Unknown
Feeds.jsx์—์„œ .feeds์˜ ๋ฐ”๋กœ ์ž์‹์š”์†Œ๊ฐ€ article์ด๋ผ article์„ .feeds ๋ฐ”๋กœ ๋‹ค์Œ์— ์จ์ฃผ๋Š” ๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  height์š”์†Œ๋Š” ์ž์‹์š”์†Œ๋“ค์˜ ๋†’์ด์— ๋”ฐ๋ผ ๊ฒฐ์ •๋˜๋‹ˆ๊น height: 100%๋ฅผ ์ฃผ์–ด๋„ feeds์˜ ๋†’์ด๊ฐ€ ๋ณ€ํ•˜์ง€๋Š” ์•Š์„ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“œ๋Š”๋ฐ ํ˜น์‹œ ์„ค์ •ํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ์œผ์‹ ๊ฐ€์š”?
@@ -1,5 +1,98 @@ import React from 'react'; +import { useState, useEffect } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './Login.scss'; -export default function Login() { - return <div>Hello, Hyeonze!</div>; -} +const Login = () => { + const [idInput, setIdInput] = useState(''); + const...
Unknown
์ด ๋‘ ์กฐ๊ฑด์„ &&๋กœ ๊ฑธ๋ฉด state๋ฅผ ํ•˜๋‚˜๋งŒ ์‚ฌ์šฉํ•˜๊ณ  validation์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ์š”? => ๋งž๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ˆ˜์ • ์ „ ์ฝ”๋“œ์—์„œ ์œ ํšจ์„ฑ๊ฒ€์‚ฌ๋ฅผ changeIdInput, changePwInput ๋‚ด์—์„œ ๊ฐ๊ฐ ํ•ด์คฌ์—ˆ๋Š”๋ฐ ํ˜ธํ™˜์„ฑ ๊ฒ€์‚ฌ์— ๋”œ๋ ˆ์ด๊ฐ€ ์ƒ๊ฒจ์„œ useEffect๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฒŒ ํ•ด๊ฒฐ์ฑ…์ด๋ผ ์ƒ๊ฐํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด ๊ณผ์ •์—์„œ changeIdInput, changePwInput ๋‚ด๋ถ€์˜ ์‚ผํ•ญ์—ฐ์‚ฐ์ž๋“ค์„ useEffect ๋‚ด๋ถ€๋กœ ์ž˜๋ผ๋‚ด์–ด ์˜ค๊ฒŒ ๋˜๋ฉด์„œ ๋กœ์ง์ด ๊ธธ์–ด์ง„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -1,5 +1,98 @@ import React from 'react'; +import { useState, useEffect } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './Login.scss'; -export default function Login() { - return <div>Hello, Hyeonze!</div>; -} +const Login = () => { + const [idInput, setIdInput] = useState(''); + const...
Unknown
[๊ณต์‹๋ฌธ์„œ React๋กœ ์‚ฌ๊ณ ํ•˜๊ธฐ](https://ko.reactjs.org/docs/thinking-in-react.html#step-3-identify-the-minimal-but-complete-representation-of-ui-state) ๋ฅผ ๋ณด์‹œ๋ฉด ์–ด๋–ค ๊ฐ’๋“ค์ด state๊ฐ€ ๋˜์–ด์•ผํ•˜๋Š”์ง€์— ๋Œ€ํ•ด ์ ํ˜€์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ๊ฐ ์‚ดํŽด๋ณด๊ณ  ํ•ด๋‹น ๋ฐ์ดํ„ฐ๋Š” state๋กœ ์ ์ ˆํ•œ์ง€ ๋Œ“๊ธ€๋กœ ๋‚จ๊ฒจ์ฃผ์„ธ์š”. ๊ฐ ๋ฐ์ดํ„ฐ์— ๋Œ€ํ•ด ์•„๋ž˜์˜ ์„ธ ๊ฐ€์ง€ ์งˆ๋ฌธ์„ ํ†ตํ•ด ๊ฒฐ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค > 1. ๋ถ€๋ชจ๋กœ๋ถ€ํ„ฐ props๋ฅผ ํ†ตํ•ด ์ „๋‹ฌ๋ฉ๋‹ˆ๊นŒ? ๊ทธ๋Ÿฌ๋ฉด ํ™•์‹คํžˆ state๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. > > 2. ์‹œ๊ฐ„...
@@ -1,5 +1,98 @@ import React from 'react'; +import { useState, useEffect } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './Login.scss'; -export default function Login() { - return <div>Hello, Hyeonze!</div>; -} +const Login = () => { + const [idInput, setIdInput] = useState(''); + const...
Unknown
๋ผ์ด๋ธŒ๋ฆฌ๋ทฐ ๋•Œ ๋ง์”€๋“œ๋ฆฐ ๊ฒƒ์ฒ˜๋Ÿผ ์กฐ๊ฑด์˜ falsy, truthyํ•œ ๊ฐ’์„ ์ด์šฉํ•ด ๋ฆฌํŒฉํ† ๋ง ํ•ด์ฃผ์„ธ์š”! :) ๋˜๋Š” state๋ฅผ ์ค„์ผ ๊ฒฝ์šฐ ๋ถˆํ•„์š”ํ•  ์ˆ˜๋„ ์žˆ๊ฒ ๋„ค์š”
@@ -0,0 +1,66 @@ +@use '../../../styles/mixin.scss' as mixin; +@use '../../../styles/color.scss' as clr; + +body { + background: clr.$bg-login; + + .login { + position: relative; + top: -80px; + + #wrapper { + @include mixin.flex($align: center); + position: relative; + flex-direction: column;...
Unknown
์œ„ ์ฝ”๋“œ๋Š” ์–ด๋””์— ์ž‘์„ฑ๋˜๋ฉด ์ข‹์„๊นŒ์š”?
@@ -0,0 +1,43 @@ +span.comment { + padding-left: 10px; + + small { + color: #a3a3a3; + } + + &:first-child { + padding: 10px; + font-weight: bold; + } + + svg { + &.delete { + display: none; + cursor: pointer; + } + + &.hearts { + color: #a3a3a3; + position: absolute; + ...
Unknown
์ž์ฃผ ์‚ฌ์šฉ์ด ๋˜๋Š” ์ปฌ๋Ÿฌ๊ฐ’์ด๋„ค์š”! ์ด๋Ÿฐ ๊ฒฝ์šฐ sass variables ๊ธฐ๋Šฅ์„ ์ด์šฉํ•˜๋Š”๊ฒƒ์€ ์–ด๋–จ๊นŒ์š”?
@@ -0,0 +1,87 @@ +import React, { useState } from 'react'; +import { AiFillHeart, AiOutlineComment, AiOutlineUpload } from 'react-icons/ai'; +import { BiDotsHorizontalRounded } from 'react-icons/bi'; +import { GrBookmark } from 'react-icons/gr'; +import './Feeds.scss'; +import Comments from './Comment/Comments'; + +exp...
Unknown
.ํ•ด๋‹น ๋ถ€๋ถ„๋„ ์ข€ ๋” ๋ฐ˜๋ณต๋˜๋Š” ๋‹จ์–ด๋ฅผ ์ค„์ผ ์ˆ˜ ์—†์„์ง€ ๊ณ ๋ฏผํ•ด๋ด…์‹œ๋‹ค. ๋”๋ถˆ์–ด ๋ถˆํ•„์š”ํ•œ state๊ฐ’๋„ ๋ณด์ด๋„ค์š”! ์œ„ ๋ฆฌ๋ทฐ๋ฅผ ์ฐธ๊ณ ํ•ด ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”!
@@ -0,0 +1,101 @@ +@use '../../../../styles/mixin.scss' as mixin; +@use '../../../../styles/color.scss' as clr; + +.feeds { + position: relative; + top: 77px; + width: 60%; + margin-bottom: 80px; + background: #fff; + + .top_menu { + @include mixin.flex($justify: space-between, $align: center); + height: 82...
Unknown
class๋ช…์€ ์–ด๋–ค ํ˜•ํƒœ๊ฐ€ ์ข‹์„๊นŒ์š”?! ํ•ด๋‹น class๋ช…์€ '๋™์ž‘'์„ ๋‚˜ํƒ€๋‚ด๊ธฐ์— ํด๋ž˜์Šค ๋„ค์ž„๋ณด๋‹ค๋Š” ํ•จ์ˆ˜๋ช…์ฒ˜๋Ÿผ ๋А๊ปด์ง‘๋‹ˆ๋‹ค!
@@ -1,5 +1,98 @@ import React from 'react'; +import { useState, useEffect } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './Login.scss'; -export default function Login() { - return <div>Hello, Hyeonze!</div>; -} +const Login = () => { + const [idInput, setIdInput] = useState(''); + const...
Unknown
- ๋ถˆํ•„์š”ํ•œ ์ฃผ์„์ฒ˜๋ฆฌ๋Š” ์‚ญ์ œํ•ด์ฃผ์„ธ์š”! - ๋”๋ถˆ์–ด์„œ className ์ž์ฒด๋ฅผ '์ƒ‰'์œผ๋กœ ์ง€์ •ํ•˜๋Š” ๊ฒƒ์€ ์ข‹์€ ๋„ค์ด๋ฐ์€ ์•„๋‹Œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์–ด๋–ค ๋„ค์ด๋ฐ์ด ์ ํ•ฉํ• ์ง€ ๊ณ ๋ฏผํ•˜์…”์„œ , ํ•ด๋‹น ์š”์†Œ๊ฐ€ ๋ฌด์—‡์ธ์ง€๋ฅผ ์ž˜ ๋‚˜ํƒ€๋‚ด๋Š” ๋„ค์ด๋ฐ์œผ๋กœ ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”. - ํ”Œ๋Ÿฌ์Šค! ์—ฌ๊ธฐ์—๋„ ์‚ฌ์šฉํ•˜์ง€ ์•Š์•„๋„ ๋˜๋Š” ์‚ผํ•ญ์—ฐ์‚ฌ์ž๊ฐ€ ์ˆจ์–ด์žˆ๋„ค์š”! ํ™•์ธํ•ด์ฃผ์„ธ์š”
@@ -0,0 +1,101 @@ +@use '../../../../styles/mixin.scss' as mixin; +@use '../../../../styles/color.scss' as clr; + +.feeds { + position: relative; + top: 77px; + width: 60%; + margin-bottom: 80px; + background: #fff; + + .top_menu { + @include mixin.flex($justify: space-between, $align: center); + height: 82...
Unknown
์ด๋ ‡๊ฒŒ ๊ฐ ์š”์†Œ์— background color๋ฅผ ๊ฐ๊ฐ ๋‹ค ๋„ฃ์–ด์ฃผ์‹  ์ด์œ ๊ฐ€ ์žˆ์œผ์‹ค๊นŒ์š”?
@@ -0,0 +1,92 @@ +{ + "stories": [ + { "imgUrl": "images/joonyoung/stories/story1.jpg", "username": "Enna" }, + { "imgUrl": "images/joonyoung/stories/story2.jpg", "username": "Jesy" }, + { "imgUrl": "images/joonyoung/stories/story3.jpg", "username": "Denial" }, + { "imgUrl": "images/joonyoung/stories/story...
Unknown
mockData king ์ค€์˜๋‹˜๐Ÿ‘ ์ •๋ง ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์„ธ๋ถ€ ๋‚ด์šฉ์€ ์ž„์˜๋กœ ๋ณ€๊ฒฝํ•œ ํ›„, ๋ฐ์ดํ„ฐ์˜ ํ˜•์‹์ข€ ๋นŒ๋ ค๋‹ค ์“ฐ๊ฒ ์Šต๋‹ˆ๋‹ค ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!
@@ -1,69 +1,105 @@ import Image from "next/image"; import Label from "@/components/Common/Label"; import icon_like_red from "@public/assets/icon_like_red.png"; -import img_avatar1 from "@public/assets/img_avatar1.svg"; import icon_active_star from "@public/assets/icon_active_star.svg"; import link from "@public/as...
Unknown
์‚ญ์ œํ•ด์ฃผ์„ธ์š”!
@@ -1,16 +1,36 @@ -import MyPlanNav from "./MyPlanNav"; -import Layout from "../Common/Layout"; -import PlanCard from "./Cards/PlanCard"; -import QuotationCardList from "./QuotationCardList"; -import { Plan } from "@/services/planService"; +import { useRouter } from "next/router"; +import MyPlanNav from "@/components/M...
Unknown
๋’ค๋กœ๊ฐ€๊ธฐ ์ธ๊ฐ€์š”??
@@ -1,16 +1,36 @@ -import MyPlanNav from "./MyPlanNav"; -import Layout from "../Common/Layout"; -import PlanCard from "./Cards/PlanCard"; -import QuotationCardList from "./QuotationCardList"; -import { Plan } from "@/services/planService"; +import { useRouter } from "next/router"; +import MyPlanNav from "@/components/M...
Unknown
์ ˆ๋Œ€ ๊ฒฝ๋กœ๋กœ ์จ์ฃผ์‹œ๋ฉด ๋‚˜์ค‘์— ํŒŒ์ผ ์œ„์น˜๊ฐ€ ๋ณ€ํ•ด๋„ ๋ฌธ์ œ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค!
@@ -19,7 +19,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "check": "npm run lint && tsc --noEmit && npm run build" }, "eslintConfig": { "extends": [
Unknown
next๋กœ๋„ lint๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ตฐ์š”?
@@ -0,0 +1,22 @@ +import * as yup from 'yup'; +import {ShippingFormData} from '@/features/cart/cartProcess/shoppingCheckOut/ShoppingCheckOut'; + +const phoneRegex = /^[0-9]{10,11}$/; +const zipcodeRegex = /^[0-9]{5}$/; +export const shippingSchema = yup.object().shape({ + name: yup + .string() + .required('์ด๋ฆ„์„ ์ž…...
TypeScript
๊ตฟ. ์ด๊ฑฐ ํ•ด๋‚ด์…จ๋„ค์š”
@@ -0,0 +1,22 @@ +import * as yup from 'yup'; +import {ShippingFormData} from '@/features/cart/cartProcess/shoppingCheckOut/ShoppingCheckOut'; + +const phoneRegex = /^[0-9]{10,11}$/; +const zipcodeRegex = /^[0-9]{5}$/; +export const shippingSchema = yup.object().shape({ + name: yup + .string() + .required('์ด๋ฆ„์„ ์ž…...
TypeScript
์ •๊ทœ์‹์„ ์ƒ์ˆ˜ํ™”ํ•˜๋ฉด ์ข€ ๋” ๋ณด๊ธฐ ํŽธํ•  ๊ฒƒ ๊ฐ™์•„์š” ex) `const MOBILE_REGEX = /^[0-9]{10,11}$/;`
@@ -1,11 +1,8 @@ import styled from 'styled-components'; import Image from 'next/image'; import confirmIcon from 'public/images/shop/confirm.svg'; -import {getRequest, getStoredToken} from '@/utils/apiClient'; -import {API_ENDPOINTS} from '@/config/ApiEndPoints'; -import {OrderResponse} from '@/types/order'; -import...
Unknown
ํฌ์œผ ์ปค์Šคํ…€ํ›…์œผ๋กœ ๋ถ„๋ฆฌํ•˜์…จ๊ตฐ์š”
@@ -1,11 +1,8 @@ import styled from 'styled-components'; import Image from 'next/image'; import confirmIcon from 'public/images/shop/confirm.svg'; -import {getRequest, getStoredToken} from '@/utils/apiClient'; -import {API_ENDPOINTS} from '@/config/ApiEndPoints'; -import {OrderResponse} from '@/types/order'; -import...
Unknown
์ด๋ ‡๊ฒŒ map ์„ ๋„๋Š” ๋Œ€์ƒ์ด ๊ธธ์–ด์งˆ ๊ฒฝ์šฐ ์ปดํฌ๋„ŒํŠธ๋กœ ๋ถ„๋ฆฌํ•˜๋ฉด ๊ฐ€๋…์„ฑ์ด ์•„์ฃผ ์ข‹์•„์ง‘๋‹ˆ๋‹ค(+๋ Œ๋”๋ง ๊ฒฉ๋ฆฌ)
@@ -1,11 +1,15 @@ -import {useForm} from 'react-hook-form'; +import {Resolver, useForm, FormProvider} from 'react-hook-form'; import styled from 'styled-components'; import {CartResponse} from '@/types/cart'; import {postRequest} from '@/utils/apiClient'; import {API_ENDPOINTS} from '@/config/ApiEndPoints'; +import...
Unknown
as๋กœ ํƒ€์ž…๋‹จ์–ธ ํ•˜๋Š” ๋ฐฉ๋ฒ•๋ฐ–์— ์—†๋‚˜์š”?
@@ -1,11 +1,15 @@ -import {useForm} from 'react-hook-form'; +import {Resolver, useForm, FormProvider} from 'react-hook-form'; import styled from 'styled-components'; import {CartResponse} from '@/types/cart'; import {postRequest} from '@/utils/apiClient'; import {API_ENDPOINTS} from '@/config/ApiEndPoints'; +import...
Unknown
object๋กœ ํ•ด์ฃผ์…จ๊ตฐ์š”!
@@ -1,7 +1,9 @@ import { + Control, FieldErrors, UseFormHandleSubmit, - UseFormRegister, + useController, + useFormContext, } from 'react-hook-form'; import styled from 'styled-components'; import {ShippingFormData} from './ShoppingCheckOut'; @@ -65,41 +67,64 @@ const ErrorMessage = styled.span` margin...
Unknown
๊ดœ์ฐฎ๊ธด ํ•œ๋ฐ, ์ด๋Ÿฐ์‹์œผ๋กœ ํ•˜๋ฉด ํ•˜๋‚˜์˜ ์ปดํฌ๋„ŒํŠธ(ํ˜„์žฌ ์ปดํฌ๋„ŒํŠธ)์—์„œ useํ›…์„ ๋„ˆ๋ฌด ๋งŽ์ด ํ˜ธ์ถœํ•ด์„œ ๋ฆฌ๋ Œ๋”๋ง์„ ํ”ผํ• ์ˆ˜๊ฐ€ ์—†์„ ๊ฒƒ ๊ฐ™์•„์š”. ์˜ˆ์‹œ) nameField๊ฐ’๋งŒ ์—…๋ฐ์ดํŠธ๋˜๊ณ , ๋‚˜๋จธ์ง€(phoneField ๋“ฑ) ๊ฐ’์€ ๊ทธ๋Œ€๋กœ์—ฌ๋„ ShoppingCheckOutInfo ์ปดํฌ๋„ŒํŠธ ์ „์ฒด๊ฐ€ ๋ฆฌ๋ Œ๋”๋ง๋˜๋ฉด์„œ ํ•˜์œ„ ์ปดํฌ๋„ŒํŠธ๋“ค ๋ชจ๋‘ ๋ฆฌ๋ Œ๋”๋ง์ด ์ผ์–ด๋‚จ ๊ทธ๋ž˜์„œ ํ•„๋“œ๋ณ„๋กœ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋ถ„๋ฆฌํ•˜๋ผ๊ณ  ๋ง์”€๋“œ๋ ธ๋˜ ๊ฑฐ์—์š”. ๊ฐ€๋…์„ฑ๋„ ์ข‹์•„์งˆ ์ˆ˜ ์žˆ๊ณ  ๊ด€์‹ฌ์‚ฌ ๋ถ„๋ฆฌ์˜ ์žฅ์ ๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๊ฑด ๋‹ค์Œ PR๋กœ ์ž‘์—…ํ•ด ๋ณด์‹œ์ฃ 
@@ -1,7 +1,9 @@ import { + Control, FieldErrors, UseFormHandleSubmit, - UseFormRegister, + useController, + useFormContext, } from 'react-hook-form'; import styled from 'styled-components'; import {ShippingFormData} from './ShoppingCheckOut'; @@ -65,41 +67,64 @@ const ErrorMessage = styled.span` margin...
Unknown
๋งŽ์ด ์ค„์—ˆ๊ตฐ์˜ค
@@ -1,4 +1,4 @@ -import axios, {AxiosResponse} from 'axios'; +import axios, {AxiosResponse, InternalAxiosRequestConfig} from 'axios'; import {API_BASE_URL} from '@/config/ApiEndPoints'; import Cookies from 'js-cookie'; @@ -9,15 +9,48 @@ const apiClient = axios.create({ }, }); +apiClient.interceptors.request.u...
TypeScript
์•ž์œผ๋กœ ๋ชจ๋“  ์ธ์ฆ์€ ์ด์ชฝ์—์„œ ์ฒ˜๋ฆฌํ•˜๊ฒŒ ๋˜๊ฒ ๊ตฐ์š” ใ…Žใ…Ž
@@ -1,4 +1,4 @@ -import axios, {AxiosResponse} from 'axios'; +import axios, {AxiosResponse, InternalAxiosRequestConfig} from 'axios'; import {API_BASE_URL} from '@/config/ApiEndPoints'; import Cookies from 'js-cookie'; @@ -9,15 +9,48 @@ const apiClient = axios.create({ }, }); +apiClient.interceptors.request.u...
TypeScript
๋ชจ๋“  ์ธ์ฆ์„ ํ•œ๊ตฐ๋ฐ์„œ ์ฒ˜๋ฆฌํ•˜๋ฉด์„œ ์„œ๋ฒ„์—์„œ ์˜จ ์š”์ฒญ(SSR ๋“ฑ)๊ณผ ํด๋ผ์ด์–ธํŠธ์—์„œ ์˜จ ์š”์ฒญ๋งˆ๋‹ค ์ฟ ํ‚ค ํŒŒ์‹ฑ์„ ๋‹ค๋ฅด๊ฒŒ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค(๋ชปํ•œ๋‹ค๊ฑฐ๋‚˜) ๊ทธ๋ž˜์„œ `typeof window`๋กœ ์„œ๋ฒ„/ํด๋ผ์ด์–ธํŠธ ํ™˜๊ฒฝ์„ ์ฒดํฌํ•˜๊ณ  ๋‹ค๋ฅด๊ฒŒ ์ฒ˜๋ฆฌํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค ๊ทธ๋ฆฌ๊ณ  ํด๋ผ์ด์–ธํŠธ(๋ธŒ๋ผ์šฐ์ €) ํ™˜๊ฒฝ์ธ ๊ฒฝ์šฐ `withCredentials: true`(https://inpa.tistory.com/entry/AXIOS-%F0%9F%93%9A-CORS-%EC%BF%A0%ED%82%A4-%EC%A0%84%EC%86%A1withCredentials-%EC%98%B5%EC%85%98) ์„ค์ •์œผ๋กœ ์ž๋™์œผ...
@@ -1,7 +1,9 @@ import { + Control, FieldErrors, UseFormHandleSubmit, - UseFormRegister, + useController, + useFormContext, } from 'react-hook-form'; import styled from 'styled-components'; import {ShippingFormData} from './ShoppingCheckOut'; @@ -65,41 +67,64 @@ const ErrorMessage = styled.span` margin...
Unknown
๋„ค๋„ค, ์—ฌ๊ธฐ ์ดํ•ด๊ฐ€ ์•ˆ๋˜๋Š” ๋ถ€๋ถ„์ด์žˆ์–ด์„œ ๋‹ค์Œ pr ์ž‘์—…ํ•˜์—ฌ ์ฝ”๋ฉ˜ํŠธ ๋‚จ๊ธฐ๊ฒ ์Šต๋‹ˆ๋‹ค.
@@ -1,4 +1,4 @@ -import axios, {AxiosResponse} from 'axios'; +import axios, {AxiosResponse, InternalAxiosRequestConfig} from 'axios'; import {API_BASE_URL} from '@/config/ApiEndPoints'; import Cookies from 'js-cookie'; @@ -9,15 +9,48 @@ const apiClient = axios.create({ }, }); +apiClient.interceptors.request.u...
TypeScript
๋„ต, https://github.com/wjdals0304/ecommerce-project/pull/47 ํ•ด๋‹น pr ์—์„œ ์ฝ”๋ฉ˜ํŠธํ• ๊ฒŒ์š”.
@@ -19,7 +19,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "check": "npm run lint && tsc --noEmit && npm run build" }, "eslintConfig": { "extends": [
Unknown
๊ถ๊ธˆํ•œ๊ฒŒ, ๊ณตํ†ต์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๋Š” apiClient.get ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ๋ณ€๊ฒฝํ•˜์˜€๋Š”๋ฐ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๊ณณ์—์„œ ์ปดํŒŒ์ผ ๋ฒ„๊ทธ๊ฐ€ ์•ˆ ์žกํžˆ๋Š” ํ˜„์ƒ์ด ์žˆ์—ˆ์–ด์š”. ํ•ด๋‹น ํŒŒ์ผ ์ ‘๊ทผํ• ๋•Œ๋งŒ ๋นจ๊ฐ„์ƒ‰์ด ์ƒ๊ธฐ๋”๋ผ๊ตฌ์š”. @uu29 ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์—์„œ๋Š” ์ปดํŒŒ์ผํ• ๋•Œ ๋ฒ„๊ทธ ์žก๋Š”๊ฒŒ ์—†๋‚˜์š”?
@@ -19,7 +19,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "check": "npm run lint && tsc --noEmit && npm run build" }, "eslintConfig": { "extends": [
Unknown
์žˆ์–ด์š”. ๋ณดํ†ต ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ ์ปดํŒŒ์ผ๋Ÿฌ์—์„œ ์ž๋™์œผ๋กœ ํ•ด์ฃผ๋Š”๋ฐ... ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ ์žฌ์‹œ์ž‘(cursor์˜ restart typescript)ํ•ด๋„ ์•ˆ๋˜๋˜๊ฐ€์š”?
@@ -19,7 +19,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "check": "npm run lint && tsc --noEmit && npm run build" }, "eslintConfig": { "extends": [
Unknown
gpt ๋ฌผ์–ด๋ณด๋‹ˆ 1. TypeScript ๋„์ž… 2. ESLint & JSDoc ํ™œ์šฉ 3. APIClient์˜ ๋ฉ”์„œ๋“œ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ณ ์ • 4. ์ •์  ๋ถ„์„ ๋„๊ตฌ (TypeScript, ESLint) ๋„์ž… ์ด๋ ‡๊ฒŒ ํ•˜๋ผ๊ณ  ํ•˜๋„ค์š”. ํ  ๋ฆฌ์Šคํƒ€ํŠธํ•ด๋„ ์•ˆ๋˜๋Š”๋“ฏํ•˜๋„ค์š”?..
@@ -19,7 +19,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "check": "npm run lint && tsc --noEmit && npm run build" }, "eslintConfig": { "extends": [
Unknown
eslint๋ฅผ ์„ค์น˜ํ•ด๋ณด๋Š”๊ฑด ์–ด๋–จ๊นŒ์š”? ํ 
@@ -0,0 +1,12 @@ +.header { + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + width: calc(430px - 48px); + height: 64px; + padding: 0 24px; + background-color: black; + color: #fff; + z-index: 1000; +}
Unknown
ํ”ผ๊ทธ๋งˆ ์‹œ์•ˆ width๊ฐ€ 430px์ด์—ˆ๊ณ , ์–‘ ์˜† padding์ด 24์˜€์–ด์„œ ์ด๋Ÿฐ calc ์ฝ”๋“œ๊ฐ€ ๋‚˜์™”์Šต๋‹ˆ๋‹ค.. โœ‹๐Ÿป๋ณดํ†ต ์ด๋ ‡๊ฒŒ ์ฒ˜๋ฆฌํ•˜์‹œ๋Š”์ง€, ํ˜น์€ ๋” ์œ ์—ฐํ•œ ๋ฐฉ์‹์ด ์žˆ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.
@@ -4,13 +4,15 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", + "dev": "vite --host", "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "test": "vitest" }, "depend...
Unknown
๊ต‰์žฅํžˆ ์‚ฌ์†Œํ•˜์ง€๋งŒ ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€ ๊ด€๋ จ ๋ฆฌ๋ทฐ ๋‚จ๊ฒจ๋ด…๋‹ˆ๋‹ค..! ์ €๋Š” ํŒจํ‚ค์ง€ ๊ด€๋ จ ์„ค์น˜๋Š” chore๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค..! ์ด๊ฒŒ ์™„๋ฒฝํ•˜๊ฒŒ ์ •ํ™•ํ•œ ์ง€๋Š” ๊ฒ€์ฆํ•ด๋ณด์ง€ ์•Š์•˜์œผ๋‚˜, ์ฐธ๊ณ ํ•ด๋ณด๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”! [์ข‹์€ ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€ ์ž‘์„ฑ๋ฒ•](https://velog.io/@iamjm29/Git-%EC%A2%8B%EC%9D%80-%EC%BB%A4%EB%B0%8B-%EB%A9%94%EC%8B%9C%EC%A7%80-%EC%9E%91%EC%84%B1%EB%B2%95) [AngularJS Commit Convention](https://gist.github.com/stephenparish/...
@@ -0,0 +1,12 @@ +.header { + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + width: calc(430px - 48px); + height: 64px; + padding: 0 24px; + background-color: black; + color: #fff; + z-index: 1000; +}
Unknown
๋Œ€๋ฐ• ์™œ ์ด์ œ ์•Œ์•˜์ง€..? ๐Ÿ‘
@@ -2,6 +2,7 @@ spring.application.name=delivery spring.jpa.hibernate.ddl-auto=update + spring.jpa.properties.hibernate.show_sql=true spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.use_sql_comments=true
Unknown
์—ฌ๊ธฐ DB ๋ฏผ๊ฐ์ •๋ณด .env๋กœ ๋นผ์ฃผ์‹ค ์ˆ˜ ์žˆ๋‚˜์š”?? ๋””์Šค์ฝ”๋“œ์— ์ œ๊ฐ€ ์‚ฌ์šฉํ•œ .env๋Š” ์˜ฌ๋ ค๋‘์—ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,18 @@ +package racingcar.view; + +import camp.nextstep.edu.missionutils.Console; + +public class InputView { + private static final String ASK_CAR_NAMES = "๊ฒฝ์ฃผํ•  ์ž๋™์ฐจ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜์„ธ์š”.(์ด๋ฆ„์€ ์‰ผํ‘œ(,) ๊ธฐ์ค€์œผ๋กœ ๊ตฌ๋ถ„)"; + private static final String ASK_TURN = "์‹œ๋„ํ•  ํšŒ์ˆ˜๋Š” ๋ช‡ํšŒ์ธ๊ฐ€์š”?"; + + public static String readCarNames() { + ...
Java
๋ฉ”์‹œ์ง€ ๊ด€๋ฆฌ์— ๋Œ€ํ•ด์„œ static์ด ์ข‹์€์ง€ enum์ด ์ข‹์€์ง€ ์ด์•ผ๊ธฐ ๋‚˜๋ˆ ๋ณด๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ํ•ญ์ƒ ์–ด๋–ค๊ฒŒ ๋‚˜์€์ง€ ๊ณ ๋ฏผํ•ด์„œ ๋งค๋ฒˆ ์“ธ๋•Œ๋งˆ๋‹ค ํ•œ๋ฒˆ์€ ์ด๋ ‡๊ฒŒ ํ•œ๋ฒˆ์€ ์ €๋ ‡๊ฒŒ ํ–ˆ์—ˆ๊ฑฐ๋“ ์š”.
@@ -0,0 +1,18 @@ +package racingcar.view; + +import camp.nextstep.edu.missionutils.Console; + +public class InputView { + private static final String ASK_CAR_NAMES = "๊ฒฝ์ฃผํ•  ์ž๋™์ฐจ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜์„ธ์š”.(์ด๋ฆ„์€ ์‰ผํ‘œ(,) ๊ธฐ์ค€์œผ๋กœ ๊ตฌ๋ถ„)"; + private static final String ASK_TURN = "์‹œ๋„ํ•  ํšŒ์ˆ˜๋Š” ๋ช‡ํšŒ์ธ๊ฐ€์š”?"; + + public static String readCarNames() { + ...
Java
์ €๋Š” System.out.print~์‚ฌ์šฉํ•˜๋Š” ๋ถ€๋ถ„์€ ์ „๋ถ€ ์ถœ๋ ฅ์œผ๋กœ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ณด์—ฌ์ง€๋Š” ๋ถ€๋ถ„์ด๋ผ๊ณ  ์ƒ๊ฐํ•ด์„œ ๋ชจ๋‘ OutputView์— ์ž‘์„ฑํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์‹ค ์ฒจ์— ์ €๋„ InputView์— ์จ๋„ ๋ ์ง€ ๊ณ ๋ฏผํ–ˆ๋Š”๋ฐ ์ด ๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ๋Š” ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์‹œ๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.
@@ -0,0 +1,38 @@ +package racingcar.view; + +import java.util.stream.Collectors; +import racingcar.domain.RacingCar; +import racingcar.domain.RacingCars; +import racingcar.domain.Winner; + +public class OutputView { + private static final String RACE_RESULT_MESSAGE = "\n์‹คํ–‰ ๊ฒฐ๊ณผ"; + private static final String DISTA...
Java
Winnerํด๋ž˜์Šค์˜ getWinner()์—์„œ ์•„๋ž˜ ์—ฐ์‚ฐ์ด ๋๋‚œ ๊ฒฐ๊ณผ๋ฅผ ๋ฆฌํ„ดํ•˜๋ฉด getter๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ ๋„ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ›์•„์˜ฌ ์ˆ˜ ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š”๋ฐ ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์‹œ๋‚˜์š”?
@@ -0,0 +1,17 @@ +package racingcar.domain; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +class CarNameTest { + @Parameterized...
Java
assertThatCode๋ฅผ ์ด์šฉํ•ด์„œ ์˜ˆ์™ธ๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š๊ณ  ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋˜๋Š”์ง€ ํ•œ๋ฒˆ ํ…Œ์ŠคํŠธ ํ•ด๋ณด๋Š” ๊ฒƒ๋„ ์ถ”์ฒœ ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
@@ -0,0 +1,22 @@ +package racingcar.domain; + +public enum ErrorMessage { + ERROR("[ERROR] "), + INVALID_NAME_LENGTH(ERROR + "์ฐจ๋Ÿ‰ ์ด๋ฆ„์€ 1-5๊ธ€์ž ์‚ฌ์ด์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค."), + INVALID_NAME_TYPE(ERROR + "์ฐจ๋Ÿ‰ ์ด๋ฆ„์€ ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."), + DUPLICATED_NAME(ERROR + "์ฐจ๋Ÿ‰ ์ด๋ฆ„์€ ์ค‘๋ณต๋  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."), + INVALID_RACING_CARS_SIZE(ERROR + "๊ฒฝ์ฃผ์—๋Š” ์ตœ์†Œ 2๋Œ€์˜...
Java
ERROR์€ ๋ณ€ํ•จ ์—†์„ ๊ฒƒ ๊ฐ™์€๋ฐ ์ƒ์ˆ˜๋กœ ๋‘๊ณ  ์ƒ์„ฑ์ž ๋ถ€๋ถ„์—์„œ this.message = "ERROR" + message๋กœ ํ•œ๋‹ค๋ฉด ๋ฉ”์‹œ์ง€ ์ž‘์„ฑํ•  ๋•Œ ์ค‘๋ณต์„ ํ”ผํ•˜๋Š”๋ฐ ๋„์›€ ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,63 @@ +package racingcar.domain; + +import static racingcar.domain.ErrorMessage.CANT_FIND_CAR; +import static racingcar.domain.ErrorMessage.DUPLICATED_NAME; +import static racingcar.domain.ErrorMessage.INVALID_RACING_CARS_SIZE; + +import java.util.List; +import java.util.stream.Collectors; + +public class Ra...
Java
return์— ๋ฐ”๋กœ ์ž‘์„ฑํ•˜๋ฉด ๊ฐ€๋…์„ฑ์ด ์กฐ๊ธˆ ๋–จ์–ด์ ธ ๋ณด์ผ๊นŒ์š”? ์ด ๋ฉ”์†Œ๋“œ ์ฒ˜๋Ÿผ ํ•œ๋ฒˆ๋งŒ ์‚ฌ์šฉํ•˜๋Š” ๋ณ€์ˆ˜๋ผ๋ฉด ๋ณ€์ˆ˜๋กœ ์ง€์ •ํ•˜์ง€ ์•Š๊ณ  ๋ฐ”๋กœ ์ž‘์„ฑํ•ด๋„ ๋  ๊ฒƒ ๊ฐ™์€๋ฐ... ์ด๋Ÿฌ๋ฉด ๊ฐ€๋…์„ฑ์ด ๋–จ์–ด์ ธ ๋ณด์ด๊ธฐ๋„ ํ•  ๊ฒƒ ๊ฐ™์•„ ๊ณ ๋ฏผ์ด ๋˜์„œ ์—ฌ์ญค๋ด…๋‹ˆ๋‹ค.
@@ -0,0 +1,51 @@ +package racingcar.domain; + +import static racingcar.domain.ErrorMessage.INVALID_NAME_LENGTH; +import static racingcar.domain.ErrorMessage.INVALID_NAME_TYPE; + +import java.util.Objects; +import java.util.regex.Pattern; + +public class CarName { + private static final int MAX_LENGTH = 5; + priva...
Java
์ •๊ทœํ‘œํ˜„์‹์— ๋ฌธ์ž์ง€์ •ํ•œ ํ›„ {1,5}์„ ์‚ฌ์šฉํ•˜๋ฉด ๊ธ€์ž ์ˆ˜ ์ œํ•œ ํ•˜๋Š”๋ฐ๋„ ๋„์›€์ด ๋  ๊ฑฐ์—์š”.
@@ -0,0 +1,35 @@ +package racingcar.domain; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; + +import java.util.List; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.junit...
Java
2๋Œ€ ์ด์ƒ์ธ ๊ฒฝ์šฐ / ์ด๋ฆ„ ์ค‘๋ณต๋˜๋ฉด ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ์— ๋Œ€ํ•ด ๋ฉ”์†Œ๋“œ๋ฅผ ๋‚˜๋ˆ ์„œ ํ…Œ์ŠคํŠธ ํ•ด๋„ ์ข‹์„๊ฑฐ๊ฐ™์Šด๋‹ค
@@ -0,0 +1,17 @@ +package racingcar.domain; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +class TurnTest { + @ParameterizedTes...
Java
์ €๋Š” validate ๋กœ์ง์— ๋Œ€ํ•ด์„œ 1. ์ˆซ์ž๋งŒ ์ž…๋ ฅ ๋ฐ›์•„์•ผํ•˜๋Š” ๋ณ€์ˆ˜์— ๋ฌธ์ž ์ž…๋ ฅ๋˜๋Š” ๊ฒฝ์šฐ -> input์—์„œ ๊ฒ€์ฆ 2. 1ํšŒ ๋ฏธ๋งŒ์œผ๋กœ ์ž…๋ ฅ๋ฐ›๋Š” ๋ฉ”์†Œ๋“œ ๊ด€๋ จ ๊ฒ€์ฆ -> turn๋ฉ”์†Œ๋“œ์—์„œ ๊ฒ€์ฆ ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ํ•ญ์ƒ ์ž‘์„ฑํ•ด ์™”๋Š”๋ฐ ์ด๋ถ€๋ถ„์— ๋Œ€ํ•ด์„œ ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค !
@@ -0,0 +1,18 @@ +package racingcar.view; + +import camp.nextstep.edu.missionutils.Console; + +public class InputView { + private static final String ASK_CAR_NAMES = "๊ฒฝ์ฃผํ•  ์ž๋™์ฐจ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜์„ธ์š”.(์ด๋ฆ„์€ ์‰ผํ‘œ(,) ๊ธฐ์ค€์œผ๋กœ ๊ตฌ๋ถ„)"; + private static final String ASK_TURN = "์‹œ๋„ํ•  ํšŒ์ˆ˜๋Š” ๋ช‡ํšŒ์ธ๊ฐ€์š”?"; + + public static String readCarNames() { + ...
Java
์ €๋Š” ์ด๋ฒˆ์— ํ”„๋ฆฌ์ฝ”์Šค๋ฅผ ์ง„ํ–‰ํ•˜๋ฉด์„œ ๋‚˜๋ฆ„์˜ ๊ธฐ์ค€์„ ์„ธ์›Œ๋ดค์Šต๋‹ˆ๋‹ค! 1. enum์œผ๋กœ ์‚ฌ์šฉํ• ๋งŒํผ ์ƒ์ˆ˜์˜ ๊ฐœ์ˆ˜๊ฐ€ ์ถฉ๋ถ„ํ•œ์ง€? ์ตœ์†Œ 3๊ฐœ ์ด์ƒ 2. ํ”„๋กœ๊ทธ๋žจ์ด ํ™•์žฅ๋œ๋‹ค๋ฉด ํ•ด๋‹น enum ์— ์ƒ์ˆ˜๊ฐ€ ์ถ”๊ฐ€๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š”์ง€? 3. ๋‹ค๋ฅธ ํด๋ž˜์Šค์—์„œ๋„ ์‚ฌ์šฉ๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š”์ง€?
@@ -0,0 +1,18 @@ +package racingcar.view; + +import camp.nextstep.edu.missionutils.Console; + +public class InputView { + private static final String ASK_CAR_NAMES = "๊ฒฝ์ฃผํ•  ์ž๋™์ฐจ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜์„ธ์š”.(์ด๋ฆ„์€ ์‰ผํ‘œ(,) ๊ธฐ์ค€์œผ๋กœ ๊ตฌ๋ถ„)"; + private static final String ASK_TURN = "์‹œ๋„ํ•  ํšŒ์ˆ˜๋Š” ๋ช‡ํšŒ์ธ๊ฐ€์š”?"; + + public static String readCarNames() { + ...
Java
์ €๋„ ์ฒ˜์Œ์— 1์ฃผ์ฐจ ๋ฏธ์…˜์„ ์ง„ํ–‰ํ•  ๋•Œ๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ณด์ด๋Š” ๋ถ€๋ถ„์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜์—ฌ OutputView์— ์ž‘์„ฑํ–ˆ์—ˆ๋Š”๋ฐ ๋งŽ์€ ๋ถ„๋“ค ์ฝ”๋“œ๋ฅผ ๋ณด๋‹ค๋ณด๋‹ˆ ์ž…๋ ฅ์„ ์š”์ฒญํ•˜๋Š” ๋ฉ”์‹œ์ง€๋Š” InputView์—์„œ ์ฒ˜๋ฆฌํ•˜์‹œ๋”๋ผ๊ตฌ์š”. ๊ทธ๋ฆฌ๊ณ  ๊ฒฐ์ •์ ์œผ๋กœ ์šฐํ…Œ์ฝ”์—์„œ ์ œ๊ณตํ•œ ์š”๊ตฌ์‚ฌํ•ญ ๋ถ€๋ถ„์„ ๋ณด์‹œ๋ฉด ์ž…๋ ฅ์„ ์š”๊ตฌํ•˜๋Š” ๋ฉ”์‹œ์ง€๋ฅผ InputView์—์„œ ์‚ฌ์šฉํ•˜๋Š”๊ฑธ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. <img width="914" alt="image" src="https://github.com/parksangchu/java-racingcar-6/assets/142131857/87aa54ff-07c6-4c03-87fe-331d6ab...
@@ -0,0 +1,22 @@ +package racingcar.domain; + +public enum ErrorMessage { + ERROR("[ERROR] "), + INVALID_NAME_LENGTH(ERROR + "์ฐจ๋Ÿ‰ ์ด๋ฆ„์€ 1-5๊ธ€์ž ์‚ฌ์ด์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค."), + INVALID_NAME_TYPE(ERROR + "์ฐจ๋Ÿ‰ ์ด๋ฆ„์€ ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."), + DUPLICATED_NAME(ERROR + "์ฐจ๋Ÿ‰ ์ด๋ฆ„์€ ์ค‘๋ณต๋  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."), + INVALID_RACING_CARS_SIZE(ERROR + "๊ฒฝ์ฃผ์—๋Š” ์ตœ์†Œ 2๋Œ€์˜...
Java
enum ์ƒ์„ฑ์ž์— ๋Œ€ํ•œ ์ดํ•ด๊ฐ€ ๋ถ€์กฑํ–ˆ๋˜๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ! ์ข‹์€ ์กฐ์–ธ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ใ…Žใ…Ž
@@ -0,0 +1,63 @@ +package racingcar.domain; + +import static racingcar.domain.ErrorMessage.CANT_FIND_CAR; +import static racingcar.domain.ErrorMessage.DUPLICATED_NAME; +import static racingcar.domain.ErrorMessage.INVALID_RACING_CARS_SIZE; + +import java.util.List; +import java.util.stream.Collectors; + +public class Ra...
Java
์ œ๊ฐ€ 3์ฃผ์ฐจ ๋ฏธ์…˜์„ ํ• ๋•Œ ๊ฒช์—ˆ๋˜ ์—๋กœ์‚ฌํ•ญ์ด ๋ฉ”์„œ๋“œ๋‚ด ๋ชจ๋“  ์ฝ”๋“œ๋ฅผ ์ถ•์•ฝ์„ ์‹œํ‚ค๋‹ค๋ณด๋‹ˆ ๋‚˜์ค‘์— ์ œ๊ฐ€ ๊ทธ ์ฝ”๋“œ๋ฅผ ๋ณด์•˜์„๋•Œ ๋ฌด์Šจ ์ฝ”๋“œ์ธ์ง€ ํ•œ๋ˆˆ์— ์•Œ๊ธฐ๊ฐ€ ํž˜๋“ค๋”๊ตฐ์š” ใ…œใ…œ ๊ทธ๋ž˜์„œ 4์ฃผ์ฐจ๋•Œ๋ถ€ํ„ฐ๋Š” ์–ด๋А์ •๋„ ์ ˆ์ œํ•ด์„œ ์ถ•์•ฝ์„ ํ•ด๋ณด๋‹ˆ ๊ฐ€๋…์„ฑ์ด ํ›จ์”ฌ ๋†’์•„์กŒ์—ˆ๋˜ ๊ฒฝํ—˜์ด ์žˆ์–ด์„œ ์ด๋ฒˆ์—๋„ ์ด๋Ÿฐ ๋ฐฉ์‹์œผ๋กœ ์ง„ํ–‰์„ ํ•ด๋ดค์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,38 @@ +package racingcar.view; + +import java.util.stream.Collectors; +import racingcar.domain.RacingCar; +import racingcar.domain.RacingCars; +import racingcar.domain.Winner; + +public class OutputView { + private static final String RACE_RESULT_MESSAGE = "\n์‹คํ–‰ ๊ฒฐ๊ณผ"; + private static final String DISTA...
Java
๋ฐ›์•„์˜จ ๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค์‹์œผ๋กœ ์ฒ˜๋ฆฌํ• ์ง€ ๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ์€ OutputView์˜ ์ฑ…์ž„์ด๋ผ๊ณ  ์ƒ๊ฐํ•ด์„œ ํ•ด๋‹น ๋ฐฉ์‹์œผ๋กœ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค~ 3์ฃผ์ฐจ ๊ณตํ†ต ํ”ผ๋“œ๋ฐฑ์—์„œ๋„ view์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋ฐ์ดํ„ฐ๋Š” getter๋ฅผ ์‚ฌ์šฉํ•˜๋ผ๊ณ  ์–ธ๊ธ‰์ด ๋˜์–ด์žˆ๊ตฌ์š”! <img width="619" alt="image" src="https://github.com/parksangchu/java-racingcar-6/assets/142131857/99c1b2c6-7c6d-49ee-8154-e9d7c306bd0b">
@@ -0,0 +1,17 @@ +package racingcar.domain; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +class CarNameTest { + @Parameterized...
Java
์ฒ˜์Œ ๋ณด๋Š” ๋ฉ”์„œ๋“œ์˜€๋Š”๋ฐ ํ•œ๋ฒˆ ์‚ฌ์šฉํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ใ…Žใ…Ž
@@ -0,0 +1,35 @@ +package racingcar.domain; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; + +import java.util.List; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.junit...
Java
์ฝ”๋“œ๋ฅผ ์ค„์ด๋ ค๊ณ  ๋„ˆ๋ฌด ์š•์‹ฌ์„ ๋‚ด๋‹ค๋ณด๋‹ˆ ๊ทธ๋งŒ ... ใ…œ ์•„๋ฌด๋ž˜๋„ ๋”ฐ๋กœ ํ…Œ์ŠคํŠธํ•˜๋Š”๊ฒŒ ๊ฐ€๋…์„ฑ ์ธก๋ฉด์—์„œ๋„ ์ข‹์„๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,17 @@ +package racingcar.domain; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +class TurnTest { + @ParameterizedTes...
Java
์ €๋„ ์›๋ž˜๋Š” ๊ทธ๋Ÿฐ ๋ฐฉ์‹์œผ๋กœ ๊ฒ€์ฆ์„ ์ง„ํ–‰ํ•ด์˜ค๋‹ค๊ฐ€ ์ด๋ฒˆ์— 'InputView์—์„œ domain์—์„œ ์“ฐ์ผ ๋ฐ์ดํ„ฐ ํ˜•ํƒœ๋ฅผ ์•„๋Š”๊ฒŒ ๋งž์„๊นŒ?'ํ•˜๋Š” ์˜๋ฌธ์ด ๋“ค์–ด ํ•ด๋‹น ๋ฐฉ์‹์œผ๋กœ ์ง„ํ–‰์„ ํ•ด๋ดค์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  'RacingCar'์™€ ๊ฐ™์€ ํ•ด๋‹น ํ”„๋กœ๊ทธ๋žจ์˜ ๋„๋ฉ”์ธ์—์„œ ์“ฐ์ด๋Š” ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•ด์„œ ๋„˜๊ธฐ๋Š” ๊ฒƒ๋งŒ ์•„๋‹ˆ๋ผ๋ฉด int์™€ ๊ฐ™์€ ๊ธฐ๋ณธ๊ฐ’ ํ˜•ํƒœ๋Š” inputView์—์„œ ๊ฒ€์ฆํ•ด๋„ ๊ดœ์ฐฎ๊ฒ ๋‹ค๋ผ๋Š” ๊ฒฐ๋ก ์„ ๋ƒˆ์Šต๋‹ˆ๋‹ค.
@@ -64,7 +64,7 @@ const BookFeedTab = ({ /> <Box sx={bookReviewTabStyles.sectionHeader}> <Typography variant="h6" fontWeight="bold"> - ํ•œ์ค„ํ‰ ({bookPostCount?.review_count}) + ํ•œ์ค„ํ‰ ({bookPostCount?.review_count || 0}) </Typography> <Button ...
Unknown
์ด ๋ถ€๋ถ„์€ ์ง€์›Œ์ฃผ์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -64,7 +64,7 @@ const BookFeedTab = ({ /> <Box sx={bookReviewTabStyles.sectionHeader}> <Typography variant="h6" fontWeight="bold"> - ํ•œ์ค„ํ‰ ({bookPostCount?.review_count}) + ํ•œ์ค„ํ‰ ({bookPostCount?.review_count || 0}) </Typography> <Button ...
Unknown
์•—, ๋„ต!
@@ -0,0 +1,11 @@ +package baseball.util; + +import java.util.Random; + +public class RamdomNumberGenerator { + private static final Random RANDOM = new Random(); + + public static Integer generate() { + return RANDOM.nextInt(9) + 1; + } +}
Java
๋ฌด์ž‘์œ„์˜ ์ˆซ์ž๋ฅผ ์ƒ์„ฑํ•˜๋Š” ํด๋ž˜์Šค๋ฅผ ๋”ฐ๋กœ ๋นผ์„œ ํ…Œ์ŠคํŠธ๋ฅผ ์šฉ์ดํ•˜๊ฒŒ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ ๊ฒŒ ์ข‹๋„ค์š”!
@@ -0,0 +1,101 @@ +package baseball.domain; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class NumericBalls implements Iterable { + private List<NumericBall> numericBalls; + + public NumericBalls() { + numericBalls = new ArrayList<>(); + } + + publi...
Java
๋ฆฌ์ŠคํŠธ์— ๋„ฃ๊ณ  ๋งต์— ๋‹ค์‹œ ๋„ฃ๋Š” ๊ฒƒ๋ณด๋‹ค ์ฒ˜์Œ๋ถ€ํ„ฐ ํ•„๋“œ๋ฅผ ๋งต์œผ๋กœ ์„ ์–ธํ•˜๊ณ  ๋งต์˜ ์ˆซ์ž์™€ ์ธ๋ฑ์Šค๋ฅผ ๋น„๊ตํ•˜๋ฉด ํšจ์œจ์ด ๋” ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”.
@@ -0,0 +1,23 @@ +package baseball.view; + +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +public class InputView { + private static final Scanner SCANNER = new Scanner(System.in); + public static List<Integer> inputNumbers() { + System.out.println("์ˆซ์ž๋ฅผ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š” : "); + List<Integer>...
Java
๊ฐ์ฒด๋ฅผ ์ƒ์ˆ˜๋กœ ์„ ์–ธํ•˜๋ฉด ์ฝ”๋“œ๊ฐ€ ํ›จ์”ฌ ๊ฐ„ํŽธํ•ด์ง€์ง€๋งŒ, final์ž„์—๋„ ๊ฐ’์ด ๋ฐ”๋€” ์ˆ˜ ์žˆ์–ด ๊ด€๋ จ์ด์Šˆ๊ฐ€ ์žˆ์„ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์œ ์˜ํ•˜๊ณ  ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”:)
@@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <link rel="icon" type="image/svg+xml" href="/vite.svg" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>react-shopping-products</title> + <script type="module" crossorigin src=...
Unknown
dist ํด๋”๊ฐ€ git ignore๋˜์ง€ ์•Š์•˜๊ตฐ์šฉ
@@ -0,0 +1,10 @@ +/** + * generateBasicToken - Basic auth๋ฅผ ์œ„ํ•œ ํ† ํฐ์„ ๋งŒ๋“œ๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค. + * @param {string} userId - USERNAME์ž…๋‹ˆ๋‹ค. + * @param {string} userPassword - PASSWORD์ž…๋‹ˆ๋‹ค. + * @returns {string} + */ +export function generateBasicToken(userId: string, userPassword: string): string { + const token = btoa(`${userId}:${userPas...
TypeScript
์„ฌ์„ธํ•œ jsdocs ๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘
@@ -0,0 +1,95 @@ +import { CartItemType, ProductType } from '../types'; +import { generateBasicToken } from './auth'; + +const API_URL = import.meta.env.VITE_API_URL; +const USER_ID = import.meta.env.VITE_USER_ID; +const USER_PASSWORD = import.meta.env.VITE_USER_PASSWORD; + +/** + * ๊ณตํ†ต ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ํ•จ์ˆ˜ + * @param {string} e...
TypeScript
๊ณตํ†ต ๋กœ์ง์„ ๋ฌถ์–ด์ฃผ๋Š” ๊ฒƒ ๋„ˆ๋ฌด ์ข‹์Šต๋‹ˆ๋‹ค~!
@@ -0,0 +1,95 @@ +import { CartItemType, ProductType } from '../types'; +import { generateBasicToken } from './auth'; + +const API_URL = import.meta.env.VITE_API_URL; +const USER_ID = import.meta.env.VITE_USER_ID; +const USER_PASSWORD = import.meta.env.VITE_USER_PASSWORD; + +/** + * ๊ณตํ†ต ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ํ•จ์ˆ˜ + * @param {string} e...
TypeScript
์žฅ๋ฐ”๊ตฌ๋‹ˆ์— 100๊ฐœ ๋„˜๊ฒŒ ๋‹ด์„ ์ˆ˜ ์žˆ๋Š” case๊ฐ€ ์กด์žฌํ•  ๊ฒƒ ๊ฐ™์•„์š”~!
@@ -0,0 +1,50 @@ +.loaderContainer { + height: 60px; + display: flex; + justify-content: center; + align-items: center; +} + +.loader { + width: 60px; + display: flex; + justify-content: space-evenly; +} + +.ball { + list-style: none; + width: 12px; + height: 12px; + border-radius: 50%; + background-color: ...
Unknown
๊ท€์—ฌ์šด ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ๋งŒ๋“ค์—ˆ๊ตฐ์šฉ ๐Ÿš€๐Ÿš€๐Ÿš€
@@ -0,0 +1,15 @@ +export const productCategories = { + all: '์ „์ฒด', + fashion: 'ํŒจ์…˜', + beverage: '์Œ๋ฃŒ', + electronics: '์ „์ž์ œํ’ˆ', + kitchen: '์ฃผ๋ฐฉ์šฉํ’ˆ', + fitness: 'ํ”ผํŠธ๋‹ˆ์Šค', + books: '๋„์„œ', +} as const; + +export const sortOptions = { priceAsc: '๋‚ฎ์€ ๊ฐ€๊ฒฉ์ˆœ', priceDesc: '๋†’์€ ๊ฐ€๊ฒฉ์ˆœ' } as const; + +export const FIRST_FETCH_PAGE = 0; +...
TypeScript
์ƒ์ˆ˜ํ™” ๐Ÿ‘๐Ÿ‘๐Ÿ‘
@@ -0,0 +1,32 @@ +import React, { createContext, useState, useCallback, ReactNode } from 'react'; +import ErrorToast from '../components/ErrorToast/ErrorToast'; + +export interface ToastContextType { + showToast: (message: string) => void; +} + +export const ToastContext = createContext<ToastContextType | undefined>(u...
Unknown
๋ณ„๋„์˜ Provider๋กœ ๋งŒ๋“ค์–ด ์ค€ ๊ฒƒ ๋„ˆ๋ฌด ์ข‹๋„ค์š”
@@ -0,0 +1,95 @@ +import { CartItemType, ProductType } from '../types'; +import { generateBasicToken } from './auth'; + +const API_URL = import.meta.env.VITE_API_URL; +const USER_ID = import.meta.env.VITE_USER_ID; +const USER_PASSWORD = import.meta.env.VITE_USER_PASSWORD; + +/** + * ๊ณตํ†ต ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ํ•จ์ˆ˜ + * @param {string} e...
TypeScript
๋งž์•„์š”... ์ž„์‹œ๋ฐฉํŽธ์ด์—ˆ๋Š”๋ฐ ๊ทธ๋ƒฅ ๊นŒ๋จน๊ณ  ๋„˜์–ด๊ฐ”๋„ค์š” ใ…œใ…œ
@@ -0,0 +1,95 @@ +import { CartItemType, ProductType } from '../types'; +import { generateBasicToken } from './auth'; + +const API_URL = import.meta.env.VITE_API_URL; +const USER_ID = import.meta.env.VITE_USER_ID; +const USER_PASSWORD = import.meta.env.VITE_USER_PASSWORD; + +/** + * ๊ณตํ†ต ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ํ•จ์ˆ˜ + * @param {string} e...
TypeScript
๊ทธ๋Ÿฐ๋ฐ.. ์ด๋ฒˆ ์žฅ๋ฐ”๊ตฌ๋‹ˆ api๋Š” 20๊ฐœ๋งŒ ๋‹ด์„ ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“ค์–ด์ ธ์žˆ๋”๋ผ๊ตฌ์š”.. ์ง€๊ธˆ api ๊ตฌํ˜„์‚ฌํ•ญ์— ๋งž์ถœ์ง€, ์•„๋‹ˆ๋ฉด ๋ฏธ๋ž˜์˜ ๋ณ€๊ฒฝ์—๋„ ์šฉ์ดํ•˜๊ฒŒ ์ฝ”๋“œ๋ฅผ ๋ฐ”๊ฟ€์ง€๋Š” ์ƒ๊ฐํ•ด ๋ด์•ผํ•  ๋ฌธ์ œ์ธ ๊ฒƒ ๊ฐ™์•„์š”. ์ด ๋ถ€๋ถ„์„ ๋ฐ”๊ฟ”์•ผ ํ•œ๋‹ค๋ฉด ์œ„์˜ >if (key === 'category' && value === 'all') ์ด ์ฝ”๋“œ์—์„œ๋„ default๋กœ ๋“ค์–ด๊ฐˆ ์ˆ˜ ์žˆ๋Š” sort=id,asc๋„ ์ƒ๊ฐํ•ด๋ด์•ผ ํ•  ๊ฒƒ ๊ฐ™๊ณ ์š”
@@ -0,0 +1,21 @@ +import { SelectHTMLAttributes, PropsWithChildren } from 'react'; +import styles from './Select.module.css'; + +interface Props extends PropsWithChildren<SelectHTMLAttributes<HTMLSelectElement>> { + options: Record<string, string>; +} + +const Select = ({ options, defaultValue, children, ...props }: P...
Unknown
entries๋ผ๋Š” ํ•จ์ˆ˜๋„ ์žˆ์œผ๋‹ˆ ์ฐพ์•„๋ณด์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”..! ``` js Object.entries(options).map([optionEn,optionKo])=>{ ... } ```
@@ -3,28 +3,50 @@ import './Login.scss'; import Login_Button from './Login_Button/Login_Button'; class Login extends Component { + constructor(props) { + super(props); + this.state = { + id: 'a', + pw: 0, + }; + } + + handleInput = e => { + const { value, name } = e.target; + this.setSta...
JavaScript
this.state ... ์ด๊ฑฐ ๋„ˆ๋ฌด ๊ธฐ๋‹ˆ๊นŒ ์ด๊ฒƒ๋„ ๋น„๊ตฌ์กฐํ™” ํ• ๋‹นํ•˜์‹œ๋Š” ๊ฒŒ ๊ฐ€๋…์„ฑ์ด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”!
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
์—ฌ๊ธฐ form ํƒœ๊ทธ๋กœ ๊ฐ์‹ธ์‹œ๊ณ  onSubmit ์ด๋ฒคํŠธ์ฃผ์‹œ๋ฉด ์—”ํ„ฐํ‚ค ๋ˆ„๋ฅผ ๋•Œ ์‹คํ–‰๋˜๋Š” ๋ฉ”์†Œ๋“œ ๋”ฐ๋กœ ์•ˆ ๋งŒ๋“œ์…”๋„ pressButton ๋ฉ”์†Œ๋“œ ํ•˜๋‚˜๋งŒ์œผ๋กœ ๋Œ“๊ธ€ ์ถ”๊ฐ€์‹œํ‚ฌ ์ˆ˜ ์žˆ์–ด์š”!
@@ -3,28 +3,50 @@ import './Login.scss'; import Login_Button from './Login_Button/Login_Button'; class Login extends Component { + constructor(props) { + super(props); + this.state = { + id: 'a', + pw: 0, + }; + } + + handleInput = e => { + const { value, name } = e.target; + this.setSta...
JavaScript
๋ง์”€ํ•˜์‹ ๋Œ€๋กœ ๋ฐ”๊ฟจ์Šต๋‹ˆ๋‹ค!
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
form์— ์ด๋Ÿฐ ๊ธฐ๋Šฅ์ด ์žˆ๋Š” ์ค„ ์ฒ˜์Œ์•Œ์•˜์Šต๋‹ˆ๋‹ค! ๋•๋ถ„์— ์ƒˆ๋กœ์šด ์ง€์‹์„ ์–ป์—ˆ์Šต๋‹ˆ๋‹ค. ์ •๋ง ๊ฐ์‚ฌํ•ด์š”!
@@ -3,28 +3,50 @@ import './Login.scss'; import Login_Button from './Login_Button/Login_Button'; class Login extends Component { + constructor(props) { + super(props); + this.state = { + id: 'a', + pw: 0, + }; + } + + handleInput = e => { + const { value, name } = e.target; + this.setSta...
JavaScript
idValue๋ฅผ ๋„˜๊ฒจ์ฃผ๋Š” ๊ฑธ๋กœ ๋ณด์ด๋Š”๋ฐ idfunc๋ผ๋Š” ์ด๋ฆ„์€ ๋งˆ์น˜ ํ•จ์ˆ˜๊ฐ™์•„์„œ ์ ํ•ฉํ•˜์ง€ ์•Š์•„๋ณด์ž…๋‹ˆ๋‹ค! pwfunc, colorfunc ๋ชจ๋‘ ๋งˆ์ฐฌ๊ฐ€์ง€์ž…๋‹ˆ๋‹ค! ๊ทธ๋ฆฌ๊ณ  colorfunc๋ผ๋Š” ๊ฐ’์€ id๋ž‘ pwํ†ตํ•ด์„œ ๊ณ„์‚ฐ ๊ฐ€๋Šฅํ•ด๋ณด์ด๋Š”๋ฐ ๊ทธ๋Ÿฌ๋ฉด idValue๋ž‘ pwValue๋งŒ Props๋กœ ๋ฐ›๊ณ , colorfunc์—์„œ ๊ณ„์‚ฐ ํ•˜๋Š” ๊ฐ’์€ LoginButton ์ปดํฌ๋„ŒํŠธ์—์„œ propsํ†ตํ•ด์„œ ๋ฐ”๋กœ ๊ณ„์‚ฐํ•ด์„œ ์‚ฌ์šฉํ•ด๋„ ๋ฌด๋ฐฉํ•ด๋ณด์ž…๋‹ˆ๋‹ค!
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
api์ฃผ์†Œ๊ฐ€ data์•ˆ์— ๋“ค์–ด์žˆ๋Š” ํ˜•ํƒœ๋Š” ๋น„์ •์ƒ์ ์ธ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! api์ฃผ์†Œ๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ๋ฐฑ์—”๋“œ์—์„œ ์ „์†กํ•ด์ฃผ์ง€ ์•Š์Šต๋‹ˆ๋‹ค! comment์ •๋ณด๋ž‘ feed์ •๋ณด๋ฅผ ๋ถ„๋ฆฌ์‹œ์ผœ๋†“์œผ์…”์„œ ๊ทธ๋Ÿฐ ๊ฒƒ ๊ฐ™์€๋ฐ, feed์•ˆ์— comment์ •๋ณด๋ฅผ ๊ทธ๋ƒฅ ๋‹ค ๋„ฃ์–ด์ฃผ์‹œ๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ``` { id: 1, profilesrc: '/images/jaesangChoi/profile1.jpeg', mainfeedsrc: 'https://images.unsplash.com/photo-1623659993428-0c5504a16ca5?ixid=Mnw...
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
get method๋Š” ๊ธฐ๋ณธ๊ฐ’์ด๋ผ์„œ ๋”ฐ๋กœ ๊ธฐ์ž…์•ˆํ•ด์ฃผ์…”๋„ ๋ฉ๋‹ˆ๋‹ค!
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
๋Œ“๊ธ€์€ ๋‚˜์ค‘์— ์‚ญ์ œ๋  ์ˆ˜๋„ ์žˆ์œผ๋‹ˆ๊นŒ id๋ฅผ length๋กœ ์‚ฌ์šฉํ•˜๋ฉด ์‚ญ์ œ ํ›„ ๋‹ค์‹œ ์ถ”๊ฐ€๋˜๋Š” ๊ฒฝ์šฐ ๋™์ผํ•œ id๋ฅผ ๊ฐ€์ง„ ๋Œ“๊ธ€์ด ์ƒ๊ธธ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
ํ•จ์ˆ˜๋Š” return๋ฌธ ๋”ฐ๋กœ ์—†์œผ๋ฉด ๋๊นŒ์ง€ ๋‹ค ์ฝ๊ณ ๋‚˜์„œ ์•Œ์•„์„œ ์ข…๋ฃŒ๋˜๊ธฐ๋•Œ๋ฌธ์— ์ž„์˜๋กœ return ํ‚ค์›Œ๋“œ๋ฅผ ์ ์„ ํ•„์š”๋Š” ์—†์–ด๋ณด์ž…๋‹ˆ๋‹ค!
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
์—ฌ๊ธฐ๋Š” alt๋ฅผ ํ•œ๊ธ€๋กœ ์ ๊ณ  ๋‹ค๋ฅธ ๊ณณ์€ ์˜์–ด๋กœ ์ ์œผ์‹  ์ด์œ ๊ฐ€ ์žˆ์œผ์‹ค๊นŒ์š”?? ์˜์–ด๋กœ ์ ์–ด์ฃผ์‹œ๋Š”๊ฒŒ ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค! ํ•œ๊ธ€์ด ๋” ์ข‹์ง€๋งŒ,, ๋งŒ๊ตญ ๊ณต์šฉ์–ด๊ฐ€ ์˜์–ด๊ธฐ ๋•Œ๋ฌธ์— ๋ณดํŽธ์„ฑ์„ ์œ„ํ•ด์„œ ๐Ÿ˜‚
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
t๋ผ๋Š” ๋ณ€์ˆ˜๋ช…์„ ๊ฐ€์ง€๊ณ ๋Š” ์—ฌ๊ธฐ์— ํ• ๋‹น๋œ ๊ฐ’์ด ๋ญ์ผ์ง€ ์ „ํ˜€ ์œ ์ถ”๊ฐ€ ์•ˆ๋˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! comments ๋ฐฐ์—ด์•ˆ์˜ ํ•˜๋‚˜ํ•˜๋‚˜์˜ ์š”์†Œ๋“ค์ด๋‹ˆ๊นŒ comment๋ผ๊ณ  ์ด๋ฆ„์ง€์–ด์ฃผ๋Š”๊ฒŒ ์ข‹์ง€ ์•Š์„๊นŒ์š”? ```suggestion {comments.map(comment => { ```
@@ -1,14 +1,51 @@ import React, { Component } from 'react'; +import Comment from './Comment/Comment'; import './Feeds.scss'; class Feeds extends Component { + constructor(props) { + super(props); + this.state = { + comment: '', + comments: [], + idnumber: 1, + }; + } + + componentDidMoun...
JavaScript
๋งˆ์ฐฌ๊ฐ€์ง€๋กœ pressButton์ด๋ผ๋Š” ์ด๋ฆ„๋งŒ ๋ณด๊ณ ๋Š” ์ „ํ˜€ ์œ ์ถ”๊ฐ€ ์•ˆ๋ฉ๋‹ˆ๋‹ค! pressButton์ด๋ผ๋Š”๊ฑด ๋ฐœ์ƒํ•˜๋Š” ์‹œ์ ์ด์ง€ ํ•จ์ˆ˜๊ฐ€ ํ•˜๊ณ ์žˆ๋Š” ๋™์ž‘์ด ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์— ํ•จ์ˆ˜์˜ ์—ญํ• ์„ ๋™์‚ฌํ˜•์œผ๋กœ ๋ช…ํ™•ํ•˜๊ฒŒ addComment ๋“ฑ์œผ๋กœ ์ด๋ฆ„์ง€์–ด์ฃผ๋Š”๊ฒŒ ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค!
@@ -5,15 +5,49 @@ import Main_right from './Main_right/Main_right'; import './Main.scss'; class Mainjaesang extends Component { + constructor(props) { + super(props); + this.state = { + feedslist: [], + }; + } + + callApi = () => { + fetch('http://localhost:3000/data/JaesangChoi/FeedsData.json')...
JavaScript
feedslist์•ˆ์˜ ํ•˜๋‚˜์˜ ์š”์†Œ๋“ค์ธ๋ฐ flist๋ผ๋Š” ๋ณ€์ˆ˜๋ช…์€ ์ ํ•ฉํ•˜์ง€ ์•Š์€๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ์ฐจ๋ผ๋ฆฌ feed๋“ฑ์ด ์ข€ ๋” ์ ํ•ฉํ•˜๊ณ  ์˜๋ฏธ๊ฐ€ ๋“œ๋Ÿฌ๋‚˜ ๋ณด์ด๋„ค์š”!
@@ -5,15 +5,49 @@ import Main_right from './Main_right/Main_right'; import './Main.scss'; class Mainjaesang extends Component { + constructor(props) { + super(props); + this.state = { + feedslist: [], + }; + } + + callApi = () => { + fetch('http://localhost:3000/data/JaesangChoi/FeedsData.json')...
JavaScript
๋ฉ”์ธ ์ฝ˜ํ…์ธ  ๊ตฌํš์„ ์˜๋ฏธํ•˜๋Š” ๊ฑฐ๋ผ๋ฉด div tag๋ณด๋‹ค๋Š” main tag๊ฐ€ ์ข€ ๋” ์ ํ•ฉํ•˜์ง€ ์•Š์„๊นŒ์š”?
@@ -1,31 +1,15 @@ - - -body { - margin: 0px; - overflow: hidden; - +main { + display: flex; + justify-content: center; + gap: 20px; + padding-top: 54px; + box-sizing: border-box; + + .bold_comment { + font-weight: bold; + } + + .grey_comment { + color: grey; + } } - - - -.main { - display: flex...
Unknown
์ด๋ฏธ display:block์ธ ์š”์†Œ์ธ๋ฐ width:100% ๋ฅผ ๋ถ€์—ฌํ•  ์ด์œ ๊ฐ€ ์—†์–ด๋ณด์ž…๋‹ˆ๋‹ค!
@@ -1,31 +1,15 @@ - - -body { - margin: 0px; - overflow: hidden; - +main { + display: flex; + justify-content: center; + gap: 20px; + padding-top: 54px; + box-sizing: border-box; + + .bold_comment { + font-weight: bold; + } + + .grey_comment { + color: grey; + } } - - - -.main { - display: flex...
Unknown
height:100vh๋กœ ๋ถ€๋ชจํƒœ๊ทธ์˜ ํฌ๊ธฐ๋ฅผ ๊ณ ์ •๊ฐ’์œผ๋กœ ์ •ํ•˜๋Š”๊ฑด ์ข‹์ง€์•Š์Šต๋‹ˆ๋‹ค! ๋ถ€๋ชจํƒœ๊ทธ์— ๊ณ ์ •๋†’์ด๊ฐ’์„ ์ฃผ๋Š”๊ฑด ์Šคํฌ๋กค์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ๋ฅผ ์ œ์™ธํ•˜๊ณ ๋Š” ์ง€์–‘ํ•˜๊ณ ์žˆ์Šต๋‹ˆ๋‹ค! ์•ˆ์— ์—ฌ๋Ÿฌ ์ž์‹ํƒœ๊ทธ๋“ค์ด ๋“ค์–ด์˜ฌํ…๋ฐ ๊ทธ ํฌ๊ธฐ๋งŒํผ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ๋Š˜์–ด๋‚˜๋„๋ก height๊ฐ’์„ ์ฃผ์ง€ ์•Š๋Š”๊ฒŒ ์ข‹์•„๋ณด์ž…๋‹ˆ๋‹ค!
@@ -1,9 +1,25 @@ import React, { Component } from 'react'; -import Recommendation_list from './Recommendation_list/Recommendation_list'; +import RecommendationList from './Recommendation_list/Recommendation_list'; +import RECOMMENDATION_DATA from './RecommendationData'; import './Main_right.scss'; class Main_right...
JavaScript
์ƒ์ˆ˜๋ฐ์ดํ„ฐ๋Š” ๋Œ€๋ฌธ์ž + snake_case ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”!
@@ -1,9 +1,25 @@ import React, { Component } from 'react'; -import Recommendation_list from './Recommendation_list/Recommendation_list'; +import RecommendationList from './Recommendation_list/Recommendation_list'; +import RECOMMENDATION_DATA from './RecommendationData'; import './Main_right.scss'; class Main_right...
JavaScript
camelCase ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”! ์ง€๊ธˆ์€ pascalCase๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ๊ณ„์‹œ๋„ค์š”!
@@ -1,9 +1,25 @@ import React, { Component } from 'react'; -import Recommendation_list from './Recommendation_list/Recommendation_list'; +import RecommendationList from './Recommendation_list/Recommendation_list'; +import RECOMMENDATION_DATA from './RecommendationData'; import './Main_right.scss'; class Main_right...
JavaScript
camelCase ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”!
@@ -1,31 +1,15 @@ - - -body { - margin: 0px; - overflow: hidden; - +main { + display: flex; + justify-content: center; + gap: 20px; + padding-top: 54px; + box-sizing: border-box; + + .bold_comment { + font-weight: bold; + } + + .grey_comment { + color: grey; + } } - - - -.main { - display: flex...
Unknown
main.scss์—์„œ mainํƒœ๊ทธ์— height: 100vh๋ฅผ ์ค€ ์ด์œ ๊ฐ€ ํ™”๋ฉด ์ „์ฒด๋ฅผ ๋ฒ”์œ„๋ฅผ ๊ฐ–๊ฒŒ ํ•ด์ฃผ๋ ค๊ณ  ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ ์ด์œ ๋Š” Main_right์˜ ๋ฐ•์Šค๊ฐ€ Nav์ฒ˜๋Ÿผ ๊ณ ์ •๋œ๊ฑธ ๊ตฌํ˜„ํ•˜๋ ค๊ณ  ํ–ˆ๊ณ  ๊ทธ ๋ฐฉ๋ฒ•์œผ๋กœ position:sticky๊ฐ€ ๋– ์˜ฌ๋ž๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. sticky๋กœ ํ™”๋ฉด์— ๊ณ„์† ๊ณ ์ •์‹œํ‚ค๊ธฐ ์œ„ํ•ด์„  ํ™”๋ฉด ์ „์ฒด์— ๋Œ€ํ•ด์„œ ๋ฒ”์œ„๋ฅผ ๊ฐ€์ ธ์•ผํ•˜๋Š”๋ฐ Main_right๋Š” mainํƒœ๊ทธ์˜ ์ž์‹์ด๊ธฐ ๋•Œ๋ฌธ์— mainํƒœ๊ทธ๊ฐ€ ํ™”๋ฉด์ „์ฒด์˜ ๋ฒ”์œ„๋ฅผ ๊ฐ€์ ธ์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ main์— height:100vh๋ฅผ ์คฌ์Šต๋‹ˆ๋‹ค์•„... height๋ฅผ auto๋กœ ์„ค์ •ํ•˜๋ฉด position:sti...
@@ -1,31 +1,15 @@ - - -body { - margin: 0px; - overflow: hidden; - +main { + display: flex; + justify-content: center; + gap: 20px; + padding-top: 54px; + box-sizing: border-box; + + .bold_comment { + font-weight: bold; + } + + .grey_comment { + color: grey; + } } - - - -.main { - display: flex...
Unknown
๋ผ์šด์ง€์— ๊ณ„์‹ค ๋•Œ ์—ฌ์ญค๋ณด๊ธธ ์ž˜ํ•œ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋•๋ถ„์— position:sticky์— ๋Œ€ํ•ด์„œ ์ฐฉ๊ฐํ–ˆ๋˜๊ฒŒ ์™„์ „ํžˆ ์žกํ˜”์Šต๋‹ˆ๋‹ค. ๋”์ด์ƒ position์€ ๋‘๋ ต์ง€ ์•Š๋„ค์š”!!!
@@ -0,0 +1,44 @@ +package christmas.controller; + +import christmas.domain.event.EventCalculator; +import christmas.domain.date.ReservationDate; +import christmas.domain.order.OrderMenuParser; +import christmas.view.InputView; +import christmas.view.OutputView; + +public class ChristmasController { + public void run...
Java
ํ•œ ๋ฉ”์„œ๋“œ์—์„œ ๋„ˆ๋ฌด ๋ณต์žกํ•ด ๋ณด์ด๋„ค์š” ๋ฉ”์„œ๋“œ๋ฅผ ๋ถ„๋ฆฌํ•˜๋ฉด ๋” ์ข‹์„๊ฑฐ ๊ฐ™์•„์š”!