code
stringlengths
41
34.3k
lang
stringclasses
8 values
review
stringlengths
1
4.74k
@@ -0,0 +1,79 @@ +.userBox { + margin: 20px; + gap: 0 24px; + display: flex; + justify-content: center; + flex-direction: column; + + .userWrap { + display: flex; + flex-direction: row; + justify-content: center; + + .user { + width: 50px; + height: 50px; + border-radius: 50%; + } + ...
Unknown
PR์ด ๋จธ์ง€๋œ๋‹ค๋ฉด, ์ด ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“  button ํƒœ๊ทธ์— `width: 120px, height: 50px` ์†์„ฑ์ด ์ ์šฉ๋˜๊ฒ ๋„ค์š”! ์ด๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์œ„์— ์ž˜ ํ•ด์ฃผ์‹  ๊ฒƒ์ฒ˜๋Ÿผ nesting๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ถ”๊ฐ€๋กœ, ํƒœ๊ทธ ์„ ํƒ์ž์˜ ์‚ฌ์šฉ์€ ๋‹ค์Œ์˜ ๊ฒฝ์šฐ ์™ธ์—๋Š” ์ง€์–‘ํ•˜๋Š” ๊ฒŒ ์ข‹์Šต๋‹ˆ๋‹ค. 1. ์ „์—ญ์— ์ ์šฉ๋˜์–ด์•ผ ํ•˜๋Š” ์Šคํƒ€์ผ (e.g. common.scss, reset.scss) 2. ์•ž์œผ๋กœ๋„ ๋ณ€๊ฒฝ๋˜์ง€ ์•Š๋Š”๋‹ค๋Š” ํ™•์‹ ์ด ์žˆ๋Š” ์š”์†Œ className์„ ๋ถ€์—ฌํ•ด์„œ ์Šคํƒ€์ผ ์†์„ฑ ๋ถ€์—ฌํ•ด ์ฃผ์„ธ์š”!
@@ -1,7 +1,17 @@ @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap'); - * { box-sizing: border-box; font-family: 'Noto Sans KR', sans-serif; -} \ No newline at end of file +} +body { + width: 100vw; + height: 100vh; + display: flex; + align-items:...
Unknown
๊ณต์šฉ ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ด์„œ ์˜ฌ๋ ค์ฃผ์…จ๋Š”๋ฐ, ๊ณต์šฉ ํŒŒ์ผ์˜ ์ˆ˜์ •์€ 1. ํŒ€์›๊ณผ์˜ ์ถฉ๋ถ„ํ•œ ์ƒ์˜ ํ›„์— 2. ํ•ด๋‹น ํŒŒ์ผ๋งŒ ์ˆ˜์ •ํ•˜๋Š” ๋‚ด์šฉ์˜ PR ์„ ์˜ฌ๋ ค์ฃผ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค!
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ฉ˜ํ† ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ฉ˜ํ†  ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ฉ˜ํ†  ๋ฆฌ๋ทฐ ๋ฐ˜์˜์™„๋ฃŒ
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
alt ์†์„ฑ์€ ํ™”๋ฉด์— ์ด๋ฏธ์ง€๊ฐ€ ํ‘œ์‹œ๋˜์ง€ ์•Š์„๋•Œ ์‚ฌ์šฉ์ž๊ฐ€ ์•Œ ์ˆ˜ ์žˆ๋„๋ก ๋Œ€์ฒด ํ…์ŠคํŠธ๋ฅผ ์ œ๊ณตํ•˜๋Š” ์—ญํ• ์„ ํ•˜๊ธฐ ๋–„๋ฌธ์— alt ๊ฐ’์— userPicture๋ฅผ ๋„ฃ๊ฒ ์๋‹ˆ๋‹ค..
@@ -0,0 +1,79 @@ +.userBox { + margin: 20px; + gap: 0 24px; + display: flex; + justify-content: center; + flex-direction: column; + + .userWrap { + display: flex; + flex-direction: row; + justify-content: center; + + .user { + width: 50px; + height: 50px; + border-radius: 50%; + } + ...
Unknown
๋ฉ˜ํ†  ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋„ต!
@@ -1,14 +1,77 @@ -import React from "react"; -import "./PostAdd.scss"; +import React, { useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import './PostAdd.scss'; +import { Button } from '../PostAdd/components/Post.jsx'; const PostAdd = () => { + const [comment, setComment] = useState('');...
JavaScript
๋ฉ˜ํ†  ๋ฆฌ๋ทฐ ๋ฐ˜์˜ ์™„๋ฃŒ(?)
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import styled from "@emotion/styled"; import { css, Theme } from "@emotion/react"; import CheckIcon from "components/inputs/TextInput/CheckIcon"; -import { TConditionCheck } from "./types/TConditionCheck"; +import { TConditionCheck } from "component...
Unknown
์‚ฌ์†Œํ•˜์ง€๋งŒ `height ?? "auto"` ๋„ ๊ดœ์ฐฎ์„ ๊ฒƒ ๊ฐ™์•„์š”!
@@ -0,0 +1,170 @@ +import styled from "@emotion/styled"; +import IconStarFilled from "components/rating/icons/IconStarFilled"; +import IconStarHalf from "components/rating/icons/IconStarHalf"; +import IconStarOutlined from "components/rating/icons/IconStarOutlined"; +import { HTMLAttributes, useEffect, useState, useRef...
Unknown
์˜ค ์ด ์ปดํฌ๋„ŒํŠธ๋Š” ์•„์ง Rating์ชฝ์ด ๋จธ์ง€ ๋˜์ง€ ์•Š์•„์„œ ์ผ๋ถ€ ๋‚ด์šฉ์„ ๊ทธ๋Œ€๋กœ ๊ฐ€์ง€๊ณ  ์˜ค์‹  ๋ถ€๋ถ„์ธ๊ฐ€์šฉ~? (+ `isInput` ๋ชจ๋“œ ์ถ”๊ฐ€๋กœ์š”?)
@@ -0,0 +1,170 @@ +import styled from "@emotion/styled"; +import IconStarFilled from "components/rating/icons/IconStarFilled"; +import IconStarHalf from "components/rating/icons/IconStarHalf"; +import IconStarOutlined from "components/rating/icons/IconStarOutlined"; +import { HTMLAttributes, useEffect, useState, useRef...
Unknown
์˜ค... ๋›ฐ์–ด๋‚œ ์‚ฌ์šฉ์„ฑ์ผ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค ๐Ÿ˜† ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,120 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Rating from "components/rating/Rating"; +import IconEditFilledWhite from "components/icons/IconEditFilledWhite"; +import Link from "next/link"; +import dayjs from "dayjs"; + +interface Pr...
Unknown
์˜ค..! ์ €ํฌ๊ฐ€ `dayjs` ๋„ ์“ฐ๊ณ  ์žˆ์–ด์„œ ํ™œ์šฉํ•ด๋ณด์‹œ๋Š” ๊ฒƒ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ์ด๋Ÿฐ ๊ฒฝ์šฐ ```tsx import dayjs from 'dayjs'; const formattedDate= dayjs(date).format("YY/MM/DD") ``` ์ด๋ ‡๊ฒŒ ํ™œ์šฉํ•ด๋ณผ ์ˆ˜๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค~
@@ -0,0 +1,120 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Rating from "components/rating/Rating"; +import IconEditFilledWhite from "components/icons/IconEditFilledWhite"; +import Link from "next/link"; +import dayjs from "dayjs"; + +interface Pr...
Unknown
`className` ์€ ๋”ฐ๋กœ ์ปจ๋ฒค์…˜์ด ์žˆ๋Š” ๊ฒƒ์€ ์•„๋‹ˆ์ง€๋งŒ ๋Œ€๋ถ€๋ถ„ kebab case ๋ฅผ ์ ์šฉํ•˜๊ณ  ์žˆ์–ด `user-info-score-div` ์ด๋Ÿฐ ์‹์€ ์–ด๋–จ๊นŒ์š”~?
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
์ด `restaurantId` ๊ฐ€ `string[]` ๋„ ๋ฐ›๊ฒŒ ํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”~?
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
์•— ์—ฌ๊ธฐ๋„ `over-title-div` ์ด๋ ‡๊ฒŒ ๊ฐ€ ์–ด๋–จ๊นŒ์š” !
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
์—ฌ๊ธฐ๋Š” ์ด ํŽ˜์ด์ง€์—์„œ ๊ฑฐ์˜ ๋ฉ”์ธ ๊ธ‰ ์ œ๋ชฉ์ธ ๊ฒƒ ๊ฐ™์€๋ฐ `<h1 />` ํƒœ๊ทธ ์ •๋„๋กœ ์‚ฌ์šฉํ•˜๋ฉด ์–ด๋–จ๊นŒ์š”~? ์•„๋ž˜๋Š” ๋ ˆํผ๋Ÿฐ์Šค์šฉ [ํŽ˜์ด์Šค๋ถ] ์˜ ๋ฉค๋ฒ„ ์ƒ์„ธ ํŽ˜์ด์ง€์ธ๋ฐ ์„œ๋น„์Šค ์ œ๋ชฉ (์ €ํฌ๋กœ ์น˜๋ฉด '์ฉ์ฉ๋Œ€ํ•™') ์€ `<h2/>` ํƒœ๊ทธ, ์œ ์ € ์ด๋ฆ„์€ `<h1/>` ์œผ๋กœ ์‚ฌ์šฉํ•œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ €ํฌ๋„ ์˜คํžˆ๋ ค ์ƒ๋‹จ navbar ์—์„œ [์ฉ์ฉ๋Œ€ํ•™] ์„ `<h2 />` ๋กœ ๋ฐ”๊พธ๊ณ  ๋ง›์ง‘์ด๋‚˜ ๋‹จ์ฒด ์ƒ์„ธ ํŽ˜์ด์ง€์—์„œ ๋ง›์ง‘์ด๋ฆ„, ๋‹จ์ฒด์ด๋ฆ„์€ `<h1/>` ์— ๋„ฃ์œผ๋ฉด semantic tagging ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ SEO ์—๋„ ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! cc. @hoon5083 ![i...
@@ -0,0 +1,85 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Button from "components/button/Button"; + +interface Props { + imgSrcList: string[]; +} + +const RestaurantDetailImgSection: React.FC<Props> = ({ imgSrcList }) => { + const [currentImgIn...
Unknown
ํ˜น์‹œ ์ด ๋ฒ„ํŠผ์€ ํ™”๋ฉด์ƒ์˜ ์–ด๋А ๋ถ€๋ถ„์ธ๊ฐ€์šฉ~? ๋กœ์ปฌ์—์„œ ๋Œ๋ ธ์„ ๋•Œ ๋…ธ์ถœ๋˜์ง€ ์•Š๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ![image](https://github.com/SystemConsultantGroup/foodhub-frontend/assets/86560973/c705c6dd-3624-40d6-8639-8764bd45609d)
@@ -0,0 +1,70 @@ +import styled from "@emotion/styled"; +import RestaurantDetailImgSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailImgSection"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +imp...
Unknown
์ž„์‹œ ์ฝ”๋“œ์ธ๊ฐ€์š”!? ๊ฐ์ฒด๊ตฌ์กฐ ๋ถ„ํ•ด๋กœ ๋ฐ›์•„์˜ค๋Š” ๊ฒƒ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ```tsx const { totalScore, totalCount, totalPages, scoreStatistics } = reviewPage1 ```
@@ -0,0 +1,137 @@ +import styled from "@emotion/styled"; +import Rating from "components/rating/Rating"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +import Button from "components/button/Button"; +import TextInput from "components...
Unknown
์˜คํƒ€๊ฐ€ ์žˆ๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,137 @@ +import styled from "@emotion/styled"; +import Rating from "components/rating/Rating"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +import Button from "components/button/Button"; +import TextInput from "components...
Unknown
์š” ๊ฐ’์„ `src/constant/limit.ts` ์—์„œ ๊ด€๋ฆฌํ•ด์ฃผ๋Š” ๊ฒƒ์€ ์–ด๋–จ๊นŒ์š”~? ํ•˜๋‚˜์˜ ํŒŒ์ผ์—์„œ ๊ฐ ์ตœ๋Œ€๊ธธ์ด๋‚˜ ์ตœ์†Œ๊ธธ์ด ์กฐ๊ฑด ๋“ฑ์„ ๊ด€๋ฆฌํ•ด์ฃผ๋ฉด ๋‚˜์ค‘์— ์ด๋ฅผ ์ฆ๊ฐ€ ๋˜๋Š” ๊ฐ์†Œ์‹œํ‚ฌ ์ผ์ด ์žˆ์„ ๋•Œ ๋Œ€์‘ํ•˜๊ธฐ ์šฉ์ดํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,18 @@ +import styled from "@emotion/styled"; +import RestaurantsReviewForm from "feature/restaurants/restaurantsReview/components/form/RestaurantsReviewForm"; + +interface Props { + restaurantId: string; +} + +const ViewRestaurantReviewCreate: React.FC<Props> = ({ restaurantId }) => { + return ( + <Emot...
Unknown
์—ฌ๊ธฐ์„œ๋„ `string []` ์„ ํŠน๋ณ„ํžˆ ์ถ”๊ฐ€ํ•ด์ฃผ์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”~?
@@ -0,0 +1,170 @@ +import styled from "@emotion/styled"; +import IconStarFilled from "components/rating/icons/IconStarFilled"; +import IconStarHalf from "components/rating/icons/IconStarHalf"; +import IconStarOutlined from "components/rating/icons/IconStarOutlined"; +import { HTMLAttributes, useEffect, useState, useRef...
Unknown
๋„ต ๋งž์Šต๋‹ˆ๋‹ค..!
@@ -0,0 +1,85 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Button from "components/button/Button"; + +interface Props { + imgSrcList: string[]; +} + +const RestaurantDetailImgSection: React.FC<Props> = ({ imgSrcList }) => { + const [currentImgIn...
Unknown
์•— ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋”๋ฅผ ๊ตฌํ˜„ํ•˜๋ ค๋‹ค๊ฐ€ ์ผ๋‹จ PR๋ถ€ํ„ฐ ์˜ฌ๋ ธ๋Š”๋ฐ, ํ•ด๋‹น ๋ฒ„ํŠผ์€ ๊ทธ ๊ณผ์ •์—์„œ ์ƒ๊ธด ๋ณ„ ์˜๋ฏธ ์—†๋Š” ๋ฒ„ํŠผ์ž…๋‹ˆ๋‹ค.. ์‚ญ์ œํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,70 @@ +import styled from "@emotion/styled"; +import RestaurantDetailImgSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailImgSection"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +imp...
Unknown
ํ™•์ธ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,137 @@ +import styled from "@emotion/styled"; +import Rating from "components/rating/Rating"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +import Button from "components/button/Button"; +import TextInput from "components...
Unknown
๋ฐœ๊ฒฌ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,137 @@ +import styled from "@emotion/styled"; +import Rating from "components/rating/Rating"; +import RestaurantDetailHeaderSection from "feature/restaurants/restaurantsDetail/components/section/RestaurantDetailHeaderSection"; +import Button from "components/button/Button"; +import TextInput from "components...
Unknown
๋„ต ์ข‹์Šต๋‹ˆ๋‹ค! ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,85 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Button from "components/button/Button"; + +interface Props { + imgSrcList: string[]; +} + +const RestaurantDetailImgSection: React.FC<Props> = ({ imgSrcList }) => { + const [currentImgIn...
Unknown
์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋”๋Š” ์•„์ง ๊ตฌํ˜„ํ•˜์ง€ ์•Š์•˜์ง€๋งŒ, ์ผ๋‹จ ์ด๋ฏธ์ง€ ์ „ํ™˜์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ๋ฒ„ํŠผ์€ ๋งŒ๋“ค์–ด๋‘์—ˆ์Šต๋‹ˆ๋‹ค! ์ง€๊ธˆ์€ ๋ฒ„ํŠผ ๋ณด์ผ ๊ฒ๋‹ˆ๋‹ค.
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
์˜ค.. ๋„ต ๋‹ค๋ฅธ ํŽ˜์ด์ง€๋„ ๋ฉ”์ธ์ด ๋˜๋Š” ํ…์ŠคํŠธ(๋ง›์ง‘ ์ด๋ฆ„, ๋‹จ์ฒด ์ด๋ฆ„)์€ `<h1 />`์„ ์‚ฌ์šฉํ•˜๋„๋ก ์ˆ˜์ •ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์ผ๋‹จ ๋ง›์ง‘ ์ƒ์„ธ ํŽ˜์ด์ง€์—์„œ๋Š” ๋ง›์ง‘ ์ด๋ฆ„์„ `<h1 />` ํƒœ๊ทธ๋กœ ์ˆ˜์ • ์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
className์„ ๋ชจ๋‘ kebab case๋กœ ์ˆ˜์ •์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,120 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Rating from "components/rating/Rating"; +import IconEditFilledWhite from "components/icons/IconEditFilledWhite"; +import Link from "next/link"; +import dayjs from "dayjs"; + +interface Pr...
Unknown
className์„ ๋ชจ๋‘ kebab case๋กœ ์ˆ˜์ •์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,120 @@ +import styled from "@emotion/styled"; +import Image from "next/image"; +import { useState } from "react"; +import Rating from "components/rating/Rating"; +import IconEditFilledWhite from "components/icons/IconEditFilledWhite"; +import Link from "next/link"; +import dayjs from "dayjs"; + +interface Pr...
Unknown
์˜ค ๋„ต ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ํ•ด๋‹น ๋ฐฉ์‹์œผ๋กœ ์ˆ˜์ • ์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค!
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import styled from "@emotion/styled"; import { css, Theme } from "@emotion/react"; import CheckIcon from "components/inputs/TextInput/CheckIcon"; -import { TConditionCheck } from "./types/TConditionCheck"; +import { TConditionCheck } from "component...
Unknown
๋„ต ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,105 @@ +import styled from "@emotion/styled"; +import RestaurantExternalLinkIcon from "feature/restaurants/restaurantsDetail/components/icons/RestaurantExternalLinkIcon"; +import Link from "next/link"; + +interface Props { + restaurantId: string; + userAuth?: number; + restaurantName: string; + restauran...
Unknown
restaurantId๋ฅผ ๋ฐ›์•„์˜ฌ ๋•Œ `const restaurantId = query.restaurantId ?? 0;` ์ด๋ ‡๊ฒŒ๋งŒ ํ–ˆ๋”๋‹ˆ props๋กœ ๋„˜๊ฒจ์ค„ ๋•Œ ํƒ€์ž… ์—๋Ÿฌ๊ฐ€ ๋– ์„œ ์ €๋ ‡๊ฒŒ ์„ค์ •ํ•œ๊ฑด๋ฐ, ํ˜„์žฌ๋Š” `const restaurantId = (query.restaurantId ?? 0) as string;` ์•„์˜ˆ ์ด๋Ÿฐ ์‹์œผ๋กœ ํƒ€์ž…์„ ๋ช…์‹œํ•ด์ฃผ์–ด์„œ props๋กœ ๋ฐ›์•„์˜ฌ ๋•Œ์—๋„ string์œผ๋กœ๋งŒ ๋ฐ›์•„์˜ค๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,18 @@ +import styled from "@emotion/styled"; +import RestaurantsReviewForm from "feature/restaurants/restaurantsReview/components/form/RestaurantsReviewForm"; + +interface Props { + restaurantId: string; +} + +const ViewRestaurantReviewCreate: React.FC<Props> = ({ restaurantId }) => { + return ( + <Emot...
Unknown
[์—ฌ๊ธฐ](https://github.com/SystemConsultantGroup/foodhub-frontend/pull/27#discussion_r1373127345)์—์„œ ์ด์œ ๋ฅผ ์„ค๋ช…ํ•˜์˜€๊ณ , ํ•ด๋‹น ๋ถ€๋ถ„ string์œผ๋กœ๋งŒ ๋ฐ›์•„์˜ค๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,170 @@ +import styled from "@emotion/styled"; +import IconStarFilled from "components/rating/icons/IconStarFilled"; +import IconStarHalf from "components/rating/icons/IconStarHalf"; +import IconStarOutlined from "components/rating/icons/IconStarOutlined"; +import { HTMLAttributes, useEffect, useState, useRef...
Unknown
๋ณ„์ ์„ dragํ•˜์—ฌ ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ๋„๋ก ์ถ”๊ฐ€์ ์œผ๋กœ ๊ตฌํ˜„ํ•˜์˜€๋Š”๋ฐ, ๋ฐ์Šคํฌํ†ฑ์—์„œ๋Š” ์ž˜ ๋˜๋Š”๋ฐ ๋ชจ๋ฐ”์ผ์—์„œ๋Š” touchMove ์ด๋ฒคํŠธ๊ฐ€ ์ค‘๊ฐ„์— ๋Š๊ธฐ๋Š” ํ˜„์ƒ์ด ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ •ํ™•ํžˆ๋Š” touchMove ๋„์ค‘์— state๋ฅผ ์„ธํŒ…ํ•˜๋ฉด, ํ„ฐ์น˜๋Š” ์ด์–ด์ง€๊ณ  ์žˆ๋Š” ์ƒํ™ฉ์ธ๋ฐ๋„ touchMove๊ฐ€ ์ธ์‹๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. selectedValue๊ฐ€ ๋ฐ”๋€Œ๋ฉด์„œ star๋“ค์ด ๋‹ค์‹œ ๋ Œ๋”๋ง๋˜๋Š” ๊ฒƒ ๋•Œ๋ฌธ์ธ ๊ฒƒ ๊ฐ™์ง€๋งŒ ์ •ํ™•ํžˆ ๋ญ ๋•Œ๋ฌธ์ธ์ง€๋Š” ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ํ•ด๊ฒฐ ๋ฐฉ์•ˆ์„ ์ฐพ๋Š” ์ค‘์ด๊ธด ํ•œ๋ฐ, ํ•˜๋‹ค๊ฐ€ ์•ˆ๋˜๋ฉด ์ด์Šˆ๋กœ ์˜ฌ๋ฆฌ๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.. @jaychang99 @hoon5083
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
๋ฆฌ์•กํŠธ ๊ด€๋ จ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ import๊ฐ€ ๋” ์šฐ์„ ์ˆœ์œ„์— ์œ„์น˜ํ•ด์•ผ ํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
import './Login.scss'; ์œ„๋กœ ๊ฐ€์•ผ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!! ๐Ÿ˜Ž
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
์ˆ˜์ •์™„๋ฃŒ ๐Ÿ˜Š
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
- variable.scss ๋Š” scss ํŒŒ์ผ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์— js ์—์„œ import ๋ฅผ ํ•˜๋Š” ๊ฒƒ์ด ์˜๋ฏธ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. - scss ํŒŒ์ผ์—์„œ ๋ณ€์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์— import ํ•ด์ฃผ์„ธ์š”!
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
- ๋‘ ํ•จ์ˆ˜๋Š” ํ•˜๋Š” ์—ญํ• ์ด ๋น„์Šทํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ถฉ๋ถ„ํžˆ ํ•˜๋‚˜์˜ ํ•จ์ˆ˜๋กœ ํ•ฉ์ณ๋ณผ ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. - Refactoring CheckList ์ฐธ๊ณ ํ•ด์„œ ์ˆ˜์ •ํ•ด ๋ณด์„ธ์š”!
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
- isActive ๋Š” id ์™€ pw ๋กœ ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’์ด์ด๊ธฐ ๋•Œ๋ฌธ์— state ๋กœ ๊ด€๋ฆฌํ•  ํ•„์š”๊ฐ€ ์—†์–ด ๋ณด์ž…๋‹ˆ๋‹ค! - ์•„๋ž˜ ๊ณต์‹ ๋ฌธ์„œ ์ฐธ๊ณ ํ•˜์…”์„œ ์–ด๋–ค ๊ฐ’๋“ค์ด state ๋กœ ์ ์ ˆํ•˜์ง€ ์•Š์€์ง€ ํŒŒ์•…ํ•ด๋ณด์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค! https://www.notion.so/wecode/Westagram-React-Refactoring-Checklist-aea297cf88ed4601b769e4b2c2cfd4e1#089493d6bfca438aa328226e327cff92
@@ -1,8 +1,100 @@ import React from 'react'; +import { withRouter } from 'react-router-dom'; +import './Login.scss'; + +class Login extends React.Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = e => { + const { value, name } = e.target; ...
JavaScript
- isActive ๋ฅผ state ๋กœ ๊ด€๋ฆฌํ•  ํ•„์š” ์—†์ด, ์—ฌ๊ธฐ์„œ ๋ฐ”๋กœ true / false ๋ฅผ ๊ณ„์‚ฐํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -1,3 +1,106 @@ -*{ - margin: 0; -} \ No newline at end of file +@import '../../../styles/variable.scss'; + +.Login { + @include flexCenter; + flex-direction: column; + align-items: center; + height: 100vh; + + .loginBox { + display: flex; + flex-direction: column; + justify-content: space-between; +...
Unknown
- css ์ž‘์—…์„ ํ•˜์‹ค๋•Œ ๋ฐ”๊นฅ ์š”์†Œ์— ํŠน์ •ํ•œ width / height ๊ฐ’์„ ๋ถ€์—ฌํ•˜์‹œ๋Š” ๊ฒƒ ๋ณด๋‹ค, ๋ฐ”๊นฅ ์š”์†Œ์˜ ํฌ๊ธฐ๋Š” ๋‚ด์šฉ๋ฌผ์˜ ํฌ๊ธฐ + margin / padding ๋“ค์˜ ํ•ฉ์œผ๋กœ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ํฌ๊ธฐ๊ฐ€ ๊ฒฐ์ •๋˜๋„๋ก ํ•˜์‹œ๋Š” ๊ฒŒ ๋” ์ข‹์Šต๋‹ˆ๋‹ค. - ํ•ญ์ƒ bottom up ๋ฐฉ์‹์œผ๋กœ ์Šคํƒ€์ผ๋ง ํ•˜๋Š” ์Šต๊ด€์„ ๋“ค์—ฌ์ฃผ์„ธ์š”!
@@ -0,0 +1,26 @@ +import React from 'react'; +import './Aside.scss'; + +import ProfileWrap from './ProfileWrap/ProfileWrap'; +import StoryBox from './StoryBox/StoryBox'; +import RecommendBox from './RecommendBox/RecommendBox'; +import WestaInfoBox from './WestaInfoBox/WestaInfoBox'; + +class Aside extends React.Compone...
JavaScript
- Import ์ˆœ์„œ ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”! ์ผ๋ฐ˜์ ์ธ convention์„ ๋”ฐ๋ฅด๋Š” ์ด์œ ๋„ ์žˆ์ง€๋งŒ ์ˆœ์„œ๋งŒ ์ž˜ ์ง€์ผœ์ฃผ์…”๋„ ๊ฐ€๋…์„ฑ์ด ์ข‹์•„์ง‘๋‹ˆ๋‹ค. ์•„๋ž˜ ์ˆœ์„œ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”. - React โ†’ Library(Package) โ†’ Component โ†’ ๋ณ€์ˆ˜ / ์ด๋ฏธ์ง€ โ†’ css ํŒŒ์ผ(scss ํŒŒ์ผ) ```suggestion import React from 'react'; import ProfileWrap from './ProfileWrap/ProfileWrap'; import StoryBox from './StoryBox/StoryBox'; import RecommendBox f...
@@ -0,0 +1,56 @@ +import React from 'react'; +import './Content.scss'; + +import Feed from './Feed/Feed'; +import Aside from './Aside/Aside'; + +class Content extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() { + fetch('http://local...
JavaScript
- `http://localhost:3000` ์€ ์ƒ๋žต ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ํฌํŠธ ๋ฒˆํ˜ธ๊ฐ€ ๋‹ฌ๋ผ์ง€๋ฉด(ex. `localhost:3001`) fetch ํ•จ์ˆ˜๋ฅผ ์ผ์ผ์ด ์ˆ˜์ •ํ•ด์ฃผ์–ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์œ ์ง€๋ณด์ˆ˜๊ฐ€ ์–ด๋ ค์›Œ์ง‘๋‹ˆ๋‹ค. ์•„๋ž˜ ์ฝ”๋“œ ์ฐธ๊ณ ํ•ด์„œ ์ˆ˜์ •ํ•ด์ฃผ์„ธ์š”! ```jsx const foo = () => { // fetch("http://localhost:3000/images/1") fetch("/images/1") } ``` - fetchํ•จ์ˆ˜์˜ `get method`๋Š” method์˜ default ๊ฐ’์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ƒ๋žต์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ```jsx const foo =...
@@ -0,0 +1,56 @@ +import React from 'react'; +import './Content.scss'; + +import Feed from './Feed/Feed'; +import Aside from './Aside/Aside'; + +class Content extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() { + fetch('http://local...
JavaScript
- mock up ๋ฐ์ดํ„ฐ์˜ ํ‚ค ๊ฐ’์€ ์Šค๋„ค์ดํฌ ์ผ€์ด์Šค๋กœ ์‚ฌ์šฉํ•ด์ฃผ์…”๋„ ๋˜์ง€๋งŒ (๋ฐฑ์—”๋“œ์—์„œ๋Š” ๋ณดํ†ต ์Šค๋„ค์ดํฌ ์ผ€์ด์Šค๋ฅผ ์“ฐ๊ธฐ ๋•Œ๋ฌธ์—) props ์˜ ์ด๋ฆ„์€ ์นด๋ฉœ ์ผ€์ด์Šค๋กœ ํ†ต์ผํ•ด ์ฃผ์„ธ์š”!
@@ -1,26 +1,39 @@ package nextstep.app; +import jakarta.servlet.http.HttpServletRequest; +import java.util.ArrayList; import nextstep.app.domain.Member; import nextstep.app.domain.MemberRepository; import nextstep.security.authentication.AuthenticationException; import nextstep.security.authentication.BasicAuthe...
Java
์ž˜ ์ถ”๊ฐ€ํ•ด์ฃผ์…จ๋„ค์š” ๐Ÿ‘
@@ -2,7 +2,10 @@ import nextstep.app.domain.Member; import nextstep.app.domain.MemberRepository; +import nextstep.security.authentication.Authentication; +import nextstep.security.authentication.AuthenticationException; import nextstep.security.authorization.Secured; +import nextstep.security.context.SecurityConte...
Java
์ด๋ฏธ Filter์—์„œ ์ฒ˜๋ฆฌํ•˜๊ณ  ์žˆ๋Š”๋ฐ ๋ถˆํ•„์š”ํ•œ ๋กœ์ง์ด ์•„๋‹๊นŒ์š”?
@@ -0,0 +1,20 @@ +package nextstep.security.util; + +import jakarta.servlet.http.HttpServletRequest; +import org.springframework.http.HttpMethod; + +public class MvcRequestMatcher implements RequestMatcher { + + private final HttpMethod method; + private final String pattern; + + public MvcRequestMatcher(HttpM...
Java
```suggestion return this.method.equals(HttpMethod.valueOf(request.getMethod())) && pattern.equals(request.getRequestURI()); ``` null-safe ๊ด€์ ์—์„œ๋Š” ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ ๋“ค์–ด์˜ค๋Š” `request.getRequestURI()`๋Š” null์ผ ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ณ„๋„๋กœ null ์ฒดํฌ๋ฅผ ํ•˜์ง€ ์•Š๋Š” ์ด์ƒ ์œ„์™€ ๊ฐ™์ด ํ‘œํ˜„ํ•˜๋Š” ๊ฒƒ์ด npe๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š” ์•ˆ์ „ํ•œ ์ฝ”๋“œ๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,14 @@ +package nextstep.security.authorization; + +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.web.AuthorizationResult; + +@FunctionalInterface +public interface AuthorizationManager<T> { + @Deprecated + AuthorizationDecision check(Authentication auth...
Java
ํ˜„์žฌ spring security๋ฅผ ํ™•์ธํ•ด๋ณด์‹œ๋ฉด `check`๋Š” deprecated๋˜์—ˆ๋Š”๋ฐ์š”. `AuthorizationDecision`์ด๋ผ๋Š” ํด๋ž˜์Šค๋Š” ๊ตฌํ˜„ํ•ด์ฃผ์‹  ๊ฒƒ์ฒ˜๋Ÿผ ๊ตฌํ˜„์ฒด๋กœ ๋˜์–ด์žˆ๊ณ , ๋ณดํ†ต์˜ ํ”„๋ ˆ์ž„์›Œํฌ๋“ค์€ ๊ทœ๋ชจ๊ฐ€ ์ปค์งˆ์ˆ˜๋ก ๋งŒ๋“ค์–ด๋‘” ๊ตฌํ˜„์ฒด๋“ค์„ ์ถ”์ƒํ™”ํ•˜๋Š” ํ˜•ํƒœ๋กœ ๊ฐœ์„ ํ•ด๋‚˜๊ฐ‘๋‹ˆ๋‹ค. `check`๊ฐ€ deprecated๋จ์— ๋”ฐ๋ผ ํ•ด๋‹น ๊ธฐ๋Šฅ์ด ๋ง‰ํžŒ ๊ฒƒ์€ ์•„๋‹ˆ๊ณ  ์ด๋ฅผ ์ถ”์ƒํ™”ํ•œ `AuthorizationResult`๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ๋ฉ”์†Œ๋“œ ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•˜๊ณ  ์žˆ์œผ๋‹ˆ ์ฐธ๊ณ ํ•ด์ฃผ์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š” :) https://github.com/franticticktick/spring-s...
@@ -0,0 +1,14 @@ +package nextstep.security.authorization; + +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.web.AuthorizationResult; + +@FunctionalInterface +public interface AuthorizationManager<T> { + @Deprecated + AuthorizationDecision check(Authentication auth...
Java
์ค€ํ˜•๋‹˜์ด ์ƒ๊ฐํ•˜์‹œ๊ธฐ์— ์„ ํƒ์‚ฌํ•ญ์œผ๋กœ ์ฃผ์–ด์ง„ `verfiy`๋Š” `check`์™€ ๋น„๊ตํ•˜์—ฌ ์–ด๋–ค ์ƒํ™ฉ์—์„œ ์‚ฌ์šฉํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์œผ์‹ ๊ฐ€์š”?
@@ -0,0 +1,22 @@ +package nextstep.security.authorization; + +import nextstep.security.authorization.web.AuthorizationResult; + +public class AuthorizationDecision implements AuthorizationResult { + public static final AuthorizationDecision ALLOW = new AuthorizationDecision(true); + public static final Authorizat...
Java
true ํ˜น์€ false๋งŒ ๊ฐ€์ง€๋Š” `AuthorizationDecision`์ด ์ž์ฃผ ์‚ฌ์šฉ๋˜๋Š”๋ฐ ์‚ฌ์šฉ๋ ๋•Œ๋งˆ๋‹ค ์ธ์Šคํ„ด์Šคํ™”ํ•˜๊ธฐ๋ณด๋‹ค๋Š” ๋ถˆ๋ณ€์ž„์„ ํ™œ์šฉํ•˜์—ฌ ๋ฏธ๋ฆฌ ๋งŒ๋“ค์–ด์ค€ ์ƒ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋„๋ก ์œ ๋„ํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™๋„ค์š”.
@@ -0,0 +1,38 @@ +package nextstep.security.authorization.web; + +import java.util.Collection; +import nextstep.security.authentication.Authentication; +import nextstep.security.authentication.AuthenticationException; +import nextstep.security.authorization.AuthorizationDecision; +import nextstep.security.authorization...
Java
์‹ค์ œ spring security์—์„œ๋Š” ์„ฑ๋Šฅ์˜ ๋ฌธ์ œ๋กœ ์ธํ•ด stream ์‚ฌ์šฉ์„ ์ œํ•œํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. https://github.com/spring-projects/spring-security/issues/7154
@@ -0,0 +1,28 @@ +package nextstep.security.authorization.web; + +import jakarta.servlet.http.HttpServletRequest; +import java.util.List; +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.AuthorizationDecision; +import nextstep.security.authorization.AuthorizationManager; ...
Java
getter๋กœ ํ˜ธ์ถœํ•˜์—ฌ ์ผ์น˜ ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค๋Š” `mapping`์—์„œ ์ฒ˜๋ฆฌํ•˜๋„๋ก ์ˆ˜์ •ํ•˜๋ฉด ์ฑ…์ž„์ด ๋ช…ํ™•ํ•˜๊ฒŒ ๋„˜์–ด๊ฐˆ ์ˆ˜ ์žˆ๊ฒ ๋„ค์š” :)
@@ -0,0 +1,43 @@ +package nextstep.security.authorization.method; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.Collections; +import java.util.Set; +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.AuthorizationDecision; +import nextst...
Java
`AuthorityAuthorizationManager`์˜ ๋กœ์ง๊ณผ ํ•จ๊ป˜๋ณด๋ฉด ```java boolean hasAuthority = authentication.getAuthorities().stream() .anyMatch(authorities::contains); return new AuthorizationDecision(hasAuthority); ``` ๋ถ€๋ถ„์ด ๋™์ผํ•œ ๊ฒƒ์„ ํ™•์ธํ•ด๋ณผ ์ˆ˜ ์žˆ์–ด์š”. ๊ฐ `AuthorizatinManager`๋Š” ๋‹จ์ผ์—์„œ ๊ฐ๊ฐ ๋ณธ์ธ์˜ ๊ฒƒ์„ ๋ชจ๋‘ ๊ตฌ์„ฑํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹Œ ์„œ๋กœ ์œ ๊ธฐ์ ์œผ๋กœ ๊ฒฐํ•ฉ๋˜์–ด ์‚ฌ์šฉํ•˜๊ธฐ๋„ ํ•˜๋Š”๋ฐ์š”. ...
@@ -0,0 +1,18 @@ +package nextstep.security.fixture; + +import java.util.Base64; +import java.util.Set; +import nextstep.app.domain.Member; + +public class MemberTestFixture { + public static final Member TEST_ADMIN_MEMBER = new Member("a@a.com", "password", "a", "", Set.of("ADMIN")); + public static final Member...
Java
(๋ฐ˜์˜ํ•˜์ง€ ์•Š์œผ์…”๋„ ๋ฉ๋‹ˆ๋‹ค.) ๊ฐœ์ธ์ ์œผ๋กœ๋Š” enum์—์„œ ์ง€์›๋˜๋Š” ๋ฉ”์†Œ๋“œ๋“ค์„ ํ™œ์šฉํ•˜๋Š” ๊ฒฝ์šฐ๋„ ๋งŽ์•„ ํŠน์ • ๋„๋ฉ”์ธ์˜ fixture๋Š” enum ์œผ๋กœ ์ƒ์„ฑํ•˜๋Š” ํŽธ์ž…๋‹ˆ๋‹ค ๐Ÿ˜„
@@ -2,7 +2,10 @@ import nextstep.app.domain.Member; import nextstep.app.domain.MemberRepository; +import nextstep.security.authentication.Authentication; +import nextstep.security.authentication.AuthenticationException; import nextstep.security.authorization.Secured; +import nextstep.security.context.SecurityConte...
Java
์•— ํ•ด๋‹น appํŒจํ‚ค์ง€์— ์ปจํŠธ๋กค๋Ÿฌ๋Š” ๊ฐ•์˜์‹ค์—์„œ ์‹ค์Šต์ดํ›„ ์ฒด๋ฆฌํ”ฝ ํ•ด์˜จ๊ฒƒ์ด๋ผ ์—ด์–ด๋ณผ ์ƒ๊ฐ์„ ๋ชปํ–ˆ๋„ค์š”. ์ˆ˜์ •ํ•ด๋‘๊ฒ ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,20 @@ +package nextstep.security.util; + +import jakarta.servlet.http.HttpServletRequest; +import org.springframework.http.HttpMethod; + +public class MvcRequestMatcher implements RequestMatcher { + + private final HttpMethod method; + private final String pattern; + + public MvcRequestMatcher(HttpM...
Java
๊ฐ„๊ณผํ•˜๊ณ  ์žˆ์—ˆ๋„ค์š”. ์ˆ˜์ •ํ•ด๋‘๊ฒ ์Šต๋‹ˆ๋‹ค! ๐Ÿ‘
@@ -0,0 +1,14 @@ +package nextstep.security.authorization; + +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.web.AuthorizationResult; + +@FunctionalInterface +public interface AuthorizationManager<T> { + @Deprecated + AuthorizationDecision check(Authentication auth...
Java
์˜ค.. ๋ถˆ๊ณผ 4๋‹ฌ์ „์— ์—…๋ฐ์ดํŠธ๋œ ๊ธฐ๋Šฅ์ด๊ตฐ์š”! ํ”ผ๋“œ๋ฐฑ ์ฃผ์‹  ๋Œ€๋กœ ๋ฐ˜์˜ํ•ด๋ณด๋ฉด์„œ ์–ด๋–ค ์‹์œผ๋กœ ์˜คํ”ˆ์†Œ์Šค๊ฐ€ ๊ฐœ์„ ๋˜์–ด ๋‚˜๊ฐ€๋Š”์ง€ ์ฒดํ—˜ ํ•ด ๋ณผ ์ˆ˜ ์žˆ์—ˆ๋„ค์š” ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.
@@ -0,0 +1,22 @@ +package nextstep.security.authorization; + +import nextstep.security.authorization.web.AuthorizationResult; + +public class AuthorizationDecision implements AuthorizationResult { + public static final AuthorizationDecision ALLOW = new AuthorizationDecision(true); + public static final Authorizat...
Java
ํ˜„ ์ƒํ™ฉ์—์„œ ๋ฉ”๋ชจ๋ฆฌ ํšจ์œจ์„ฑ์„ ๋” ๋†’์ผ ์ˆ˜ ์žˆ๊ฒ ๋„ค์š”!
@@ -0,0 +1,38 @@ +package nextstep.security.authorization.web; + +import java.util.Collection; +import nextstep.security.authentication.Authentication; +import nextstep.security.authentication.AuthenticationException; +import nextstep.security.authorization.AuthorizationDecision; +import nextstep.security.authorization...
Java
๊ฐ€๋…์„ฑ ๋•Œ๋ฌธ์— stream์„ ์„ ํ˜ธํ•˜๋Š” ํŽธ์ธ๋ฐ, spring security๊ฐ™์€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ์„ฑ๋Šฅ์ด ์ค‘์š”ํ•˜๋‹ค๋ณด๋‹ˆ ๊ทธ๋ ‡๊ฒŒ ๋œ๊ฑฐ๊ตฐ์š”.. ๊ตฌํ˜„์ฒด ์ฝ”๋“œ ๋ณด๋ฉด์„œ ๊ฐ€๋…์„ฑ์ด ์ƒ๊ฐ๋งŒํผ์€ ์•„๋‹Œ๊ฒƒ ๊ฐ™์•˜๋Š”๋ฐ, ๊ทธ ์œ„ํ™”๊ฐ์ด ์—ฌ๊ธฐ์„œ ๊ธฐ์ธํ•œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,28 @@ +package nextstep.security.authorization.web; + +import jakarta.servlet.http.HttpServletRequest; +import java.util.List; +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.AuthorizationDecision; +import nextstep.security.authorization.AuthorizationManager; ...
Java
์Œ.. ์ œ ์ƒ๊ฐ์œผ๋กœ๋Š” `mapping`์ธ `RequestMatcherEntry`๋Š” `RequestMatcher`๋ž‘ `AuthorizationManager`๋ฅผ ๋‹จ์ˆœํžˆ ๋ฌถ์–ด์ฃผ๋Š” ์—ญํ• ์„ ์ˆ˜ํ–‰ํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•ด์„œ, ํ•ด๋‹น ๊ฐ์ฒด์— `matches()`์˜ ๋กœ์ง๊นŒ์ง€ ์žˆ์œผ๋ฉด ์˜คํžˆ๋ ค ์ฑ…์ž„์ด ๊ณผํ•ด์ง€๊ณ , ์›๋ž˜ RequestMatcher์˜ ์—ญํ• ์ด ํ๋ ค์งˆ๊ฒƒ ๊ฐ™์•„ getter๋กœ ํ˜ธ์ถœํ•ด์„œ ์ผ์น˜ ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค. ์ œ๊ฐ€ ์ œ๋Œ€๋กœ ์ดํ•ดํ•œ๊ฑฐ๋ผ๋ฉด ์ง„์˜๋‹˜ ์ƒ๊ฐ์ด ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค!
@@ -0,0 +1,18 @@ +package nextstep.security.fixture; + +import java.util.Base64; +import java.util.Set; +import nextstep.app.domain.Member; + +public class MemberTestFixture { + public static final Member TEST_ADMIN_MEMBER = new Member("a@a.com", "password", "a", "", Set.of("ADMIN")); + public static final Member...
Java
3๋‹จ๊ณ„ ์ˆ˜ํ–‰ํ•˜๋ฉด์„œ ๋ณ€๊ฒฝํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค! ๐Ÿ˜„
@@ -0,0 +1,43 @@ +package nextstep.security.authorization.method; + +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.Collections; +import java.util.Set; +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.AuthorizationDecision; +import nextst...
Java
[83a4efd](https://github.com/next-step/spring-security-authorization/pull/15/commits/83a4efd95662b7e9d2590f72ee5a56173a16477d) ์œผ๋กœ ๋ฐ˜์˜ํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค! ๊ฐ์ž์˜ Manager๊ฐ€ ๋‹จ์ผ ์ฑ…์ž„์ด ์•„๋‹Œ ๊ฒฐํ•ฉํ•ด์„œ ์‚ฌ์šฉํ•˜๊ธฐ๋„ ํ•˜๋Š”๊ตฐ์š”! ์ €๋„ ์ž‘์—…ํ•˜๋ฉด์„œ ๊ฐ™์€ ๋กœ์ง์ด ๋“ค์–ด๊ฐ„๋‹ค๊ณ  ์ƒ๊ฐ์ด ๋“ค์—ˆ๋Š”๋ฐ, ์ด๋Ÿฐ์‹์œผ๋กœ๋„ ์—ญํ• ๊ณผ ์ฑ…์ž„ ๋ถ„๋ฐฐ๋ฅผ ๊ฐ€์ ธ๊ฐˆ ์ˆ˜ ์žˆ๊ฒ ๋„ค์š”! ํ˜„์žฌ ๋ง์”€ํ•ด์ฃผ์‹  `AuthoritiesAuthorizationManager` ์ฒ˜๋Ÿผ ๋‹ค์–‘ํ•œ ๊ถŒํ•œ ์ฒด๊ณ„๋Š” ์—†๊ธฐ ๋–„๋ฌธ์— ๊ธฐ์กด `Se...
@@ -0,0 +1,14 @@ +package nextstep.security.authorization; + +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.web.AuthorizationResult; + +@FunctionalInterface +public interface AuthorizationManager<T> { + @Deprecated + AuthorizationDecision check(Authentication auth...
Java
์Œ.. ๊ฒฐ๊ตญ์—” **์ธ๊ฐ€์‹คํŒจ์‹œ ์˜ˆ์™ธ๋ฅผ ๋ฐœ์ƒ์‹œํ‚จ๋‹ค.** ๊ฐ€ ํ•ต์‹ฌ์ด๋ผ๊ณ  ์ƒ๊ฐํ•ด์š”. check๋กœ๋Š” null์ด ์˜ฌ ์ˆ˜๋„ ์žˆ๊ณ , ๊ถŒํ•œ์ด ์—†๋‹ค ํ•  ์ง€์–ด๋„ ์—๋Ÿฌ์ฝ”๋“œ ๋“ฑ์—์„œ ๊ฐœ๋ฐœ์ž ๋งˆ์Œ๋Œ€๋กœ ํ•ธ๋“ค๋ง ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐ˜๋ฉด์—, verify๋Š” ์ธ๊ฐ€์— ์‹คํŒจํ•œ ๊ฒฝ์šฐ ๋™์ผํ•œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒ๋œ๋‹ค. ๋ผ๋Š” ์ ์—์„œ ์ถ”์ ์— ์šฉ์ดํ•  ๊ฒƒ ๊ฐ™๊ณ , ์ธ์ ์˜ค๋ฅ˜๋ฅผ ์ตœ์†Œํ™” ํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™๋‹ค๊ณ  ์ƒ๊ฐ์ด ๋“œ๋„ค์š”! ๋”ฐ๋ผ์„œ ๊ด€๋ฆฌ์ž ์ „์šฉ API๋“ฑ ๊ถŒํ•œ์ด ์—†์œผ๋ฉด ์ถ”๊ฐ€์ ์ธ ๋กœ์ง ์—†์ด ๋ฐ”๋กœ ์˜ˆ์™ธ๋ฅผ ๋˜์งˆ๋•Œ ์‚ฌ์šฉํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค~
@@ -0,0 +1,14 @@ +package nextstep.security.authorization; + +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.web.AuthorizationResult; + +@FunctionalInterface +public interface AuthorizationManager<T> { + @Deprecated + AuthorizationDecision check(Authentication auth...
Java
๋„ค ์‚ฌ์‹ค `verify`๋ฅผ ๋‹จ์ผ๋กœ ์“ฐ๋ฉด ์ €ํฌ๊ฐ€ ํ”ํžˆ ์•Œ๊ณ  ์žˆ๋“ฏ ์˜ˆ์™ธ๋ฅผ ๋ฐœ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ๊ณณ์—์„œ ์˜ˆ์™ธ๋ฅผ ๋ฐœ์ƒ์‹œํ‚ค๋Š” ๊ฒƒ์ด ๋งž๊ธฐ๋Š” ํ•ฉ๋‹ˆ๋‹ค. ๋‹ค๋งŒ `AuthorizationManager`์˜ ์›๋ž˜ ์ฑ…์ž„์€ ์ธ๊ฐ€๊ฐ€ ๋œ ์œ ์ €์ธ์ง€๋ฅผ ํ™•์ธํ•˜๋Š” ๊ฒƒ์ด๊ณ  ์ด๊ฑด ์ธ๊ฐ€๊ฐ€ ์‹คํŒจ๋˜์—ˆ๋‹ค๋Š” ๊ฒƒ์ด ์—๋Ÿฌ ์ƒํ™ฉ์ด ์•„๋‹Œ ์ •์ƒ์ ์ธ ๋น„์ฆˆ๋‹ˆ์Šค์˜ ํ๋ฆ„์ด๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ์–ด์š”. ์ธ๊ฐ€๊ฐ€ ์‹คํŒจํ•œ ๊ฒƒ์— ๋Œ€ํ•œ ๊ฒฐ๊ณผ๊ฐ€ ์˜ˆ์™ธ๊ฐ€ ๋‚˜๋Š” ๊ฒƒ์€ `AuthorizationFilter`๊ฐ€ ์ธ๊ฐ€ ์‹คํŒจ์˜ ๊ฒฐ๊ณผ๊ฐ€ ์˜ˆ์™ธ์ด๋‹ค๋ผ๋Š” ๊ฒƒ์„ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ์ผ๋ฟ์ธ ๊ฒƒ์ด๊ตฌ์š”. ์‹ค์ œ `AuthorizationManager`๋“ค์˜ ๊ตฌํ˜„์ฒด๋ฅผ ๋ณด์‹œ๋ฉด ์ด๋Ÿฐ ์ด์œ ...
@@ -0,0 +1,28 @@ +package nextstep.security.authorization.web; + +import jakarta.servlet.http.HttpServletRequest; +import java.util.List; +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.AuthorizationDecision; +import nextstep.security.authorization.AuthorizationManager; ...
Java
```suggestion if (mapping.matches(request)) { ``` ์ œ๊ฐ€ ์˜๋„ ๋“œ๋ ธ๋˜ ๋‚ด์šฉ์€ getter๋ฅผ ๊บผ๋‚ด์™€์„œ ๋‹ค์‹œ ํ˜ธ์ถœํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹Œ ํ•ด๋‹น ๊ฐ์ฒด ๋‚ด์—์„œ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ”์‹œ์ง€๋ฅผ ๋˜์ง€๋Š” ํ˜•ํƒœ๋ฅผ ๋ง์”€๋“œ๋ฆฐ ๊ฒƒ์ด์—ˆ์–ด์š”. getter๋ฅผ ํ˜ธ์ถœํ•ด์„œ ๋ฉ”์†Œ๋“œ ์ฒด์ด๋‹์ด ๋˜๋Š” ๊ฒƒ์€ ๊ฐ์ฒด์˜ ์—ญํ• ์ด ์žˆ๋‹ค๊ธฐ๋ณด๋‹จ ๋‹จ์ˆœํžˆ ๋ž˜ํ•‘ํด๋ž˜์Šค๊ฐ€ ๋˜์–ด๋ฒ„๋ ค ์ฑ…์ž„๊ณผ ์—ญํ• ์ด ๋ถˆ๋ถ„๋ช…ํ•ด์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ```java public boolean matches(HttpServletRequest request) { return reque...
@@ -0,0 +1,13 @@ +package nextstep.security.authorization.web; + +import jakarta.servlet.http.HttpServletRequest; +import nextstep.security.authentication.Authentication; +import nextstep.security.authorization.AuthorizationDecision; +import nextstep.security.authorization.AuthorizationManager; + +public class DenyAllA...
Java
```suggestion public AuthorizationResult check(Authentication authentication, HttpServletRequest object) { ``` ๋ฐ˜ํ™˜ ํƒ€์ž…๋“ค๋„ ์ž˜ ์ถ”์ƒํ™”ํ•ด์ฃผ์‹  ํด๋ž˜์Šค๋กœ ๋งŒ๋“ค์–ด์ฃผ๋ฉด ์ข‹๊ฒ ๋„ค์š” :)
@@ -0,0 +1,22 @@ +package nextstep.security.authorization; + +import nextstep.security.authorization.web.AuthorizationResult; + +public class AuthorizationDecision implements AuthorizationResult { + public static final AuthorizationDecision ALLOW = new AuthorizationDecision(true); + public static final Authorizat...
Java
```suggestion public static AuthorizationDecision from(boolean granted) { ``` ๊ด€์Šต์ ์œผ๋กœ ์ •์  ํŒฉํ† ๋ฆฌ ๋ฉ”์†Œ๋“œ๋Š” ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ํ•˜๋‚˜์ผ๋•Œ from, ์—ฌ๋Ÿฌ๊ฐœ์ผ๋•Œ of๋ฅผ ํ™œ์šฉํ•ฉ๋‹ˆ๋‹ค.
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
๊ตฌ์กฐ๋ถ„ํ•ดํ• ๋‹น์„ ์ž˜ ์“ฐ์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
comment๊ด€๋ จ ํ•จ์ˆ˜๋ฅผ ๊น”๋”ํ•˜๊ฒŒ ์ž˜ ์ •๋ฆฌํ•˜์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
์ปค๋ฉ˜ํŠธ ์ปดํฌ๋„ŒํŠธ์— ํ”„๋กญ์Šค ์ „๋‹ฌ์„ ๊น”๋”ํ•˜๊ฒŒ ์ž˜ ํ•˜์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
์‚ผํ•ญ์—ฐ์‚ฐ์ž ์‚ฌ์šฉ์„ ์ž˜ ํ•˜์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
Lifecycle Method๋ฅผ ์ž˜ ์‚ฌ์šฉํ•˜์‹ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
์ €๋„ ์ ์šฉํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค!๐Ÿ‘
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
๋ฒ„ํŠผ์ด ํ™œ์„ฑํ™”๋  ๋•Œ ์ƒ‰์ƒ ๋ณ€๊ฒฝ๊ณผ ๋น„ํ™œ์„ฑํ™” ๊ธฐ๋Šฅ๊นŒ์ง€ ๊ตฌํ˜„ํ•˜์‹  ์  ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค:)
@@ -0,0 +1,74 @@ +[ + { + "id": 1, + "userName": "bbangho", + "alt": "wecode", + "img": "/images/youngho/hanRiver.jpeg", + "comment": [ + { + "id": 1, + "userName": "bbangho", + "content": "ํ•œ๊ฐ• ๋‹ค๋…€๊ฐ~ โœŒ๏ธ", + "isLiked": true + }, + { + "id": 2, + "use...
Unknown
๋ชฉ๋ฐ์ดํ„ฐ ์‚ฌ์šฉ ๋„ˆ๋ฌด ์ข‹์Šต๋‹ˆ๋‹ค! :)
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
```suggestion <button onClick={this.handleLogin} className={condition ? 'buttonActivate' : 'buttonDisabled'} id="loginButton" disabled={ condition ? false : true} > ๋กœ๊ทธ์ธ </button> ``` ํ•ด๋‹น ์กฐ๊ฑด...
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
์ฐธ๊ณ ๋กœ ์œ„์˜ ๋ณ€์ˆ˜๋Š” render ํ•จ์ˆ˜ ๋‚ด์—์„œ ์„ ์–ธํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค!!
@@ -0,0 +1,78 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +body { + background-color: #fafafa; +} + +.container { + text-align: center; + width: 600px; + height: 600px; + margin: 50px auto 0 auto; + border: 1px solid #e6e6e6; + background-color: white; +} + +.header { + padding:...
Unknown
```suggestion body { background-color: #fafafa; } .container { text-align: center; border: 1px solid #e6e6e6; background-color: white; width: 600px; height: 600px; margin: 50px auto 0 auto; } .header { font-family: 'Lobster', cursive; font-size: 70px; font-weight: 1px; padding:...
@@ -0,0 +1,78 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +body { + background-color: #fafafa; +} + +.container { + text-align: center; + width: 600px; + height: 600px; + margin: 50px auto 0 auto; + border: 1px solid #e6e6e6; + background-color: white; +} + +.header { + padding:...
Unknown
์˜ํ˜ธ๋‹˜! ์ „์ฒด์ ์œผ๋กœ CSS ์†์„ฑ ์ˆœ์„œ ํ™•์ธํ•ด์„œ ์ ์šฉํ•ด์ฃผ์„ธ์š”~ - ํ•˜๋‚˜์˜ ์š”์†Œ์— ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์†์„ฑ์„ ๋ถ€์—ฌํ•˜๋Š” ๊ฒฝ์šฐ ์ค‘์š”๋„, ๊ด€๋ จ๋„์— ๋”ฐ๋ผ์„œ ๋‚˜๋ฆ„์˜ convention์„ ์ง€์ผœ์„œ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. - ์ผ๋ฐ˜์ ์ธ convention ์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์ด ์ˆœ์„œ ์ ์šฉํ•ด์ฃผ์„ธ์š”. [CSS property ์ˆœ์„œ] - Layout Properties (position, float, clear, display) - Box Model Properties (width, height, margin, padding) - Visual ...
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
import ์ˆœ์„œ๋Š” ์ž˜ ๋งž์ถฐ์ฃผ์…จ๊ณ , ํ•ด๋‹น ๋ถ€๋ถ„์—์„œ๋Š” ์ค„๋ฐ”๊ฟˆ ์—†์ด ์ง„ํ–‰ํ•ด์ฃผ์„ธ์š”~
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
fetchํ•จ์ˆ˜์˜ `get method๋Š” method์˜ default` ๊ฐ’์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ `์ƒ๋žต์ด ๊ฐ€๋Šฅ`ํ•ฉ๋‹ˆ๋‹ค. ๊ณ ๋กœ get method ์š”์ฒญ์‹œ์—๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด ๋‘๋ฒˆ์งธ ์ธ์ž๊ฐ€ ์ƒ๋žต ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ```jsx const foo = () => { fetch(`${cartAPI}/quantity`) .then((res) => res.json()) ```
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
story ๋ถ€๋ถ„์ด ์—ฌ๋Ÿฌ๋ฒˆ ๋ฐ˜๋ณต๋˜๊ณ  ์žˆ๋„ค์š”! ์ƒ์ˆ˜ ๋ฐ์ดํ„ฐ์™€ map์„ ์‚ฌ์šฉํ•ด์„œ ์ค‘๋ณต๋œ ๋ถ€๋ถ„์„ ์ค„์—ฌ์ฃผ์„ธ์š”! ``` const STORIES = [ {img: "//", name: "wecorder1"}, {img: "//", name: "wecorder2"}, {img: "//", name: "wecorder3"} ]; STORIES.map(); ```
@@ -0,0 +1,285 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +@media screen and (max-width: 1200px) { + .mainRight { + display: none; + } + + .article { + width: 100%; + } +} + +body { + margin: 0; + padding: 0; + border-collapse: collapse; +} + +article { + width: 800px; + ...
Unknown
๋ฐ˜์‘ํ˜• ์•„์ฃผ ์ข‹๋„ค์š”!! ๋ธŒ๋ ˆ์ดํฌ ํฌ์ธํŠธ๋Š” ๊ธฐํš๋งˆ๋‹ค ๋‹ฌ๋ผ์ง€์ง€๋งŒ ๋ณดํ†ต ํƒœ๋ธ”๋ฆฟ๊ณผ ๋ฐ์Šคํฌํƒ‘์˜ ๊ตฌ๋ถ„์ ์€ 1078px์ด๋ผ๋Š” ์  ์•Œ์•„๋‘์„ธ์š”! ๋ชจ๋ฐ”์ผ๊ณผ ํƒœ๋ธ”๋ฆฟ์€ 768px์ž…๋‹ˆ๋‹ค!
@@ -0,0 +1,285 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +@media screen and (max-width: 1200px) { + .mainRight { + display: none; + } + + .article { + width: 100%; + } +} + +body { + margin: 0; + padding: 0; + border-collapse: collapse; +} + +article { + width: 800px; + ...
Unknown
๊ฐ™์€ ์Šคํƒ€์ผ์˜ ๊ฒฝ์šฐ์—๋Š” ์ค‘๋ณตํ•˜์—ฌ ์ฃผ์‹œ์ง€ ๋ง๊ณ  ๊ฐ™์€ ํด๋ž˜์Šค๋ช…์„ ์‚ฌ์šฉํ•˜์…”๋„ ๋ฉ๋‹ˆ๋‹ค!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
import ๊ตฌ๋ถ„์€ ๋„ˆ๋ฌด ์ข‹์ง€๋งŒ ์ค„๋ฐ”๊ฟˆ์€ ์•ˆํ•˜์…”๋„ ๋ฉ๋‹ˆ๋‹ค!!!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
์ด๋ ‡๊ฒŒ ๊ตฌ์กฐ๋ถ„ํ•ดํ• ๋‹น ๋„ˆ๋ฌด ์ข‹๋„ค์š”!!
@@ -0,0 +1,74 @@ +[ + { + "id": 1, + "userName": "bbangho", + "alt": "wecode", + "img": "/images/youngho/hanRiver.jpeg", + "comment": [ + { + "id": 1, + "userName": "bbangho", + "content": "ํ•œ๊ฐ• ๋‹ค๋…€๊ฐ~ โœŒ๏ธ", + "isLiked": true + }, + { + "id": 2, + "use...
Unknown
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!
@@ -1,10 +1,94 @@ import React from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends React.Component { + constructor() { + super(); + this.state = { + loginId: '', + loginPassword: '', + }; + } + + handleLoginInput = e => { + const { value, na...
JavaScript
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,78 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +body { + background-color: #fafafa; +} + +.container { + text-align: center; + width: 600px; + height: 600px; + margin: 50px auto 0 auto; + border: 1px solid #e6e6e6; + background-color: white; +} + +.header { + padding:...
Unknown
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,78 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +body { + background-color: #fafafa; +} + +.container { + text-align: center; + width: 600px; + height: 600px; + margin: 50px auto 0 auto; + border: 1px solid #e6e6e6; + background-color: white; +} + +.header { + padding:...
Unknown
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -1,10 +1,178 @@ import React from 'react'; +import Nav from '../../../components/Nav/Nav'; +import Feed from '../../../components/Feed/Feed'; +import './Main.scss'; + class Main extends React.Component { + constructor() { + super(); + this.state = { + feeds: [], + }; + } + + componentDidMount() ...
JavaScript
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,285 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +@media screen and (max-width: 1200px) { + .mainRight { + display: none; + } + + .article { + width: 100%; + } +} + +body { + margin: 0; + padding: 0; + border-collapse: collapse; +} + +article { + width: 800px; + ...
Unknown
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!
@@ -0,0 +1,285 @@ +@import 'https://fonts.googleapis.com/css2?family=Lobster&display=swap'; +@media screen and (max-width: 1200px) { + .mainRight { + display: none; + } + + .article { + width: 100%; + } +} + +body { + margin: 0; + padding: 0; + border-collapse: collapse; +} + +article { + width: 800px; + ...
Unknown
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,125 @@ +import React from 'react'; +import Comment from '../Comment/Comment'; +import './Feed.scss'; + +class Feed extends React.Component { + constructor(props) { + super(props); + const { comment } = this.props.data; + this.state = { + comment: comment, + commentInputValue: '', + }; ...
JavaScript
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ๐ŸŒ
@@ -0,0 +1,17 @@ +from django.db import models + +class User(models.Model): + email = models.EmailField(max_length=50, unique=True) + password = models.CharField(max_length=100) + relation = models.ManyToManyField('self', through='Follow', symmetrical=False) + + class Meta: + db_table = "users" + ...
Python
๋‹ค๋ฏผ๋‹˜! ์ž˜ ์ž‘์„ฑํ•ด์ฃผ์…จ๋Š”๋ฐ `email` ์€ ๊ฒน์น  ์ˆ˜ ์—†๋Š” ์ •๋ณด์ด๊ธฐ ๋•Œ๋ฌธ์— ํ•ด๋‹นํ•˜๋Š” ์˜ต์…˜์„ ์ถ”๊ฐ€ํ•ด์ฃผ์‹œ๋Š”๊ฒŒ ์ข‹์Šต๋‹ˆ๋‹ค! ์•Œ์•„๋ณด์‹œ๊ณ  ์•Œ๋งž์€ ์˜ต์…˜์„ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”~