code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | import 순서에도 유지보수 및 가독성을 위한 컨벤션이 있습니다.
위코드의 컨벤션은 간략하게 아래와 같고, 참고해서 수정해 주세요!
- 라이브러리
- React 관련 패키지
- 외부 라이브러리
- 컴포넌트
- 공통 컴포넌트 → 먼 컴포넌트 → 가까운 컴포넌트
- 함수, 변수 및 설정 파일
- 사진 등 미디어 파일(`.png`)
- css 파일 (.`scss`) |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | event 객체에는 여러 데이터가 담겨있습니다.
그 중에서 target의 value(input에 입력한 값)만을 사용하기 때문에, 함수를 호출할 때 인자로 아예 event.target.value만을 인자로 넘겨서 사용하면 이 함수의 사용이 좀 더 명확하겠네요! |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | 실수로 눌렀을 경우에도 무조건 list 페이지로 이동하게 될 텐데, 선택권을 줄 수도 있겠네요.
`window.confirm` 함수에 대해 찾아보고 적용해보셔도 좋을 것 같습니다! |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | fetch 함수의 인자는 보통 2개가 들어가는데, 지금은 옵션에 관련된 두 번째 인자만 작성되어 있네요!
실제로 통신하실 때에는 첫 번째 인자인 `API` 값도 잘 전달해 주세요! |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | 불필요하게 3중으로 감싸고 있는 것 같은데, 일단 최상위의 div는 불필요해 보이네요!
요소가 중첩될 수록, 프로젝트의 규모가 커질 수록 로딩되는 시간이 길어지기 때문에 불필요하게 중첩된 요소는 지워주셔야 합니다! |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | img 태그의 alt 값은 어디에 활용될까요?
찾아보시고 올바르게 작성해 주세요! |
@@ -0,0 +1,79 @@
+.userBox {
+ margin: 20px;
+ gap: 0 24px;
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+
+ .userWrap {
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+
+ .user {
+ width: 50px;
+ height: 50px;
+ border-radius: 50%;
+ }
+
... | Unknown | PR이 머지된다면, 이 프로젝트의 모든 button 태그에 `width: 120px, height: 50px` 속성이 적용되겠네요!
이를 방지하기 위해서는 위에 잘 해주신 것처럼 nesting되어야 합니다.
추가로, 태그 선택자의 사용은 다음의 경우 외에는 지양하는 게 좋습니다.
1. 전역에 적용되어야 하는 스타일 (e.g. common.scss, reset.scss)
2. 앞으로도 변경되지 않는다는 확신이 있는 요소
className을 부여해서 스타일 속성 부여해 주세요! |
@@ -1,7 +1,17 @@
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap');
-
* {
box-sizing: border-box;
font-family: 'Noto Sans KR', sans-serif;
-}
\ No newline at end of file
+}
+body {
+ width: 100vw;
+ height: 100vh;
+ display: flex;
+ align-items:... | Unknown | 공용 파일을 수정해서 올려주셨는데, 공용 파일의 수정은
1. 팀원과의 충분한 상의 후에
2. 해당 파일만 수정하는 내용의 PR
을 올려주셔야 합니다! |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | 멘토리뷰 반영 완료 |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | 멘토 리뷰 반영 완료 |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | 멘토 리뷰 반영완료 |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | alt 속성은 화면에 이미지가 표시되지 않을때 사용자가 알 수 있도록 대체 텍스트를 제공하는 역할을 하기 떄문에 alt 값에 userPicture를 넣겠읍니다.. |
@@ -0,0 +1,79 @@
+.userBox {
+ margin: 20px;
+ gap: 0 24px;
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+
+ .userWrap {
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+
+ .user {
+ width: 50px;
+ height: 50px;
+ border-radius: 50%;
+ }
+
... | Unknown | 멘토 리뷰 반영 완료 |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | 넵! |
@@ -1,14 +1,77 @@
-import React from "react";
-import "./PostAdd.scss";
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import './PostAdd.scss';
+import { Button } from '../PostAdd/components/Post.jsx';
const PostAdd = () => {
+ const [comment, setComment] = useState('');... | JavaScript | 멘토 리뷰 반영 완료(?) |
@@ -27,6 +27,7 @@ public class RecommendController {
private final RecommendService recommendService;
private final ReviewService reviewService;
+ // 선택한 리뷰 추천하기
@PostMapping("/{reviewId}")
public ResponseEntity<Long> createRecommend(
@AuthenticationPrincipal WebtyUserDetails webtyUserDetails,
@@ -36,6 +37... | Java | // 특정 유저의 추천 리뷰 조회
->
// 로그인한 사용자 기준) 추천한 리뷰 목록 조회 |
@@ -27,6 +27,7 @@ public class RecommendController {
private final RecommendService recommendService;
private final ReviewService reviewService;
+ // 선택한 리뷰 추천하기
@PostMapping("/{reviewId}")
public ResponseEntity<Long> createRecommend(
@AuthenticationPrincipal WebtyUserDetails webtyUserDetails,
@@ -36,6 +37... | Java | // 특정 리뷰의 로그인된 유저 추천 현황 조회
->
// 로그인한 사용자 기준) 해당 리뷰글의 추천 여부 반환 |
@@ -0,0 +1,48 @@
+import { SERVER } from '@/constants/url';
+import axios from 'axios';
+
+interface CreateReviewParams {
+ userId: string;
+ travelId: string;
+ reviewImgs: File[];
+ travelScore: number;
+ content: string;
+ title: string;
+ guideScore?: number;
+}
+
+export const createReview = async ({
+ use... | TypeScript | _:warning: Potential issue_
**폼 데이터 구성 시 0점 처리 주의**
`guideScore`가 0점이면 `if (guideScore)` 조건에서는 누락됩니다. 유저가 의도적으로 0점을 입력할 가능성이 있다면, 조건문을 `guideScore !== undefined` 등의 방식으로 수정해보세요.
```diff
- if (guideScore) {
+ if (guideScore !== undefined && guideScore !== null) {
formData.append('guideScore', guideScore.toS... |
@@ -11,6 +11,10 @@ import GuideProfile from '@/components/GuideProfile';
import StarRating from '@/components/StarRating';
import FileUploadBtn from '@/components/FileUploadBtn';
+import useCreateReview from '@/hooks/query/useCreateReview';
+import { ShowToast } from '@/components/Toast';
+import { REVIEW_CONSTANTS... | Unknown | _:warning: Potential issue_
**제출 버튼 로딩 상태 구현 수정 필요**
현재 구현에 문법적 오류가 있습니다. 템플릿 리터럴과 조건부 렌더링이 잘못 사용되었습니다.
```diff
- ${isLoading &&
- `cursor: not-allowed;
- opacity: 0.5;
- `}
+ ${isLoading ? `
+ cursor:... |
@@ -11,6 +11,10 @@ import GuideProfile from '@/components/GuideProfile';
import StarRating from '@/components/StarRating';
import FileUploadBtn from '@/components/FileUploadBtn';
+import useCreateReview from '@/hooks/query/useCreateReview';
+import { ShowToast } from '@/components/Toast';
+import { REVIEW_CONSTANTS... | Unknown | _:hammer_and_wrench: Refactor suggestion_
**뮤테이션 에러 처리 추가 필요**
성공 시 처리는 잘 되어있지만, 실패 시 처리가 누락되어 있습니다.
```diff
mutate(
{
userId,
travelId,
reviewImgs: files,
travelScore: travelRating,
content: reviewContent,
title: reviewTitle,
...(userRating ... |
@@ -11,6 +11,10 @@ import GuideProfile from '@/components/GuideProfile';
import StarRating from '@/components/StarRating';
import FileUploadBtn from '@/components/FileUploadBtn';
+import useCreateReview from '@/hooks/query/useCreateReview';
+import { ShowToast } from '@/components/Toast';
+import { REVIEW_CONSTANTS... | Unknown | _:hammer_and_wrench: Refactor suggestion_
**폼 유효성 검사 보완 필요**
현재는 기본적인 검사만 수행하고 있습니다. 추가적인 유효성 검사가 필요합니다.
```diff
+ const MAX_CONTENT_LENGTH = 1000;
+
+ if (reviewContent.length > MAX_CONTENT_LENGTH) {
+ ShowToast(`리뷰 내용은 ${MAX_CONTENT_LENGTH}자를 초과할 수 없습니다.`, 'failed');
+ return;
+ }
+
if (rev... |
@@ -1,11 +1,11 @@
import DeleteIcon from '@/components/DeleteIcon';
import { textEllipsis } from '@/styles/GlobalStyles';
import { Review } from '@/types/reviewType';
-import { dateToString } from '@/utils/dataToString';
import { css } from '@emotion/react';
import Rating from '@/components/Rating';
import Prof... | Unknown | _:hammer_and_wrench: Refactor suggestion_
**모바일 환경을 고려한 반응형 디자인이 필요합니다.**
`min-width: 530px`는 모바일 기기에서 가로 스크롤을 발생시킬 수 있습니다. 미디어 쿼리를 사용하여 모바일 환경에서는 다른 값을 적용하는 것이 좋겠습니다.
```diff
const reviewStyle = css`
- min-width: 530px;
+ width: 100%;
+ @media (min-width: 530px) {
+ min-width: 530px;
+ }
```
<!-- suggesti... |
@@ -1,11 +1,11 @@
import DeleteIcon from '@/components/DeleteIcon';
import { textEllipsis } from '@/styles/GlobalStyles';
import { Review } from '@/types/reviewType';
-import { dateToString } from '@/utils/dataToString';
import { css } from '@emotion/react';
import Rating from '@/components/Rating';
import Prof... | Unknown | _:warning: Potential issue_
**이미지 렌더링 시 key prop이 잘못된 위치에 있습니다.**
현재 `key` prop이 `img` 태그에 있지만, map 함수의 최상위 요소인 `div`로 이동해야 합니다. 또한, 이미지 URL을 key로 사용하는 것이 index보다 더 안정적입니다.
```diff
{Array.isArray(review.imgSrc) &&
review.imgSrc.length > 0 &&
review.imgSrc.map((src, index) => (
- <div className="imgCon... |
@@ -1,58 +1,52 @@
-import reviewImage from '@/assets/reviewImg.png';
import ReviewCard from '@/components/myReview/ReviewCard';
-import { Review } from '@/types/reviewType';
-// import ReviewWriteModal from '@/components/myReview/ReviewWriteModal';
-
-const data: { reviews: Review[] } = {
- reviews: [
- {
- r... | Unknown | _:hammer_and_wrench: Refactor suggestion_
**사용자 ID 타입 캐스팅 개선 필요**
사용자 ID를 문자열로 강제 캐스팅하는 부분이 있습니다. 타입 안전성을 높이기 위해 개선이 필요합니다.
다음과 같이 수정을 제안합니다:
```diff
- userId: (user?.userId as string) || '',
+ userId: user?.userId ?? '',
```
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>... |
@@ -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 | 혹시 이 버튼은 화면상의 어느 부분인가용~?
로컬에서 돌렸을 때 노출되지 않는 것 같습니다!
 |
@@ -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,17 +1,38 @@
import { AccessTokenGuard } from '#guards/access-token.guard.js';
import { IReviewController } from '#reviews/interfaces/review.controller.interface.js';
-import { Body, Controller, Delete, Get, Param, Post, UseGuards } from '@nestjs/common';
+import { Body, Controller, Delete, Get, Param, Post, Que... | TypeScript | userId는 액세스 토큰에서 가져올 수 있으니 파라미터에서 가져올 필요는 없어보여요! |
@@ -1,17 +1,38 @@
import { AccessTokenGuard } from '#guards/access-token.guard.js';
import { IReviewController } from '#reviews/interfaces/review.controller.interface.js';
-import { Body, Controller, Delete, Get, Param, Post, UseGuards } from '@nestjs/common';
+import { Body, Controller, Delete, Get, Param, Post, Que... | TypeScript | 기사 리뷰 조회는 기사 상세 조회에서 하게 될 것으로 보이는데
기사 상세 조회는 비회원도 열람 가능한 페이지입니다! |
@@ -1,7 +1,7 @@
import { PrismaService } from '#global/prisma.service.js';
import { IReviewRepository } from '#reviews/interfaces/review.repository.interface.js';
import { ReviewInputDTO } from '#reviews/review.types.js';
-import { FindOptions } from '#types/options.type.js';
+import { FindOptions, SortOrder } from ... | TypeScript | repository의 한 메소드는 하나의 결과만을 내보내는 것이 좋습니다.
count 메소드는 findMany와 따로 작성하고, service에서 결과를 합쳐서 내보내는 것이 더 바람직할 것 같아요! |
@@ -1,7 +1,7 @@
import { PrismaService } from '#global/prisma.service.js';
import { IReviewRepository } from '#reviews/interfaces/review.repository.interface.js';
import { ReviewInputDTO } from '#reviews/review.types.js';
-import { FindOptions } from '#types/options.type.js';
+import { FindOptions, SortOrder } from ... | TypeScript | 위와 마찬가지 |
@@ -0,0 +1,23 @@
+public class Calculator {
+
+ public int add(int fir, int sec) {
+ return fir + sec;
+ }
+
+ public int subtract(int fir, int sec) {
+ return fir - sec;
+ }
+
+ public int multiply(int fir, int sec) {
+ return fir * sec;
+ }
+
+ public int divide(int fir, int ... | Java | 예외처리 👍 |
@@ -0,0 +1,40 @@
+public class StringCalculator {
+
+ public int add(String string) {
+ if (string.isEmpty()) {
+ return 0;
+ }
+
+
+ String[] numbers = string.split(",|:");
+ return sum(numbers);
+ }
+
+ private int sum(String[] numbers) {
+ int total = 0;
+
+ ... | Java | 변수명을 string으로 하기보다는 좀 더 나은 변수명으로 짓는 것이 가독성 측면에서 좋아보여요! |
@@ -0,0 +1,40 @@
+public class StringCalculator {
+
+ public int add(String string) {
+ if (string.isEmpty()) {
+ return 0;
+ }
+
+
+ String[] numbers = string.split(",|:");
+ return sum(numbers);
+ }
+
+ private int sum(String[] numbers) {
+ int total = 0;
+
+ ... | Java | 4번째 줄의 코드와 중복되는 부분으로 보이네요.
따로 모듈화해서 함수로 만들어주면 가독성도 좋아지고 재사용성도 높아져요. |
@@ -0,0 +1,15 @@
+public class CalculatorTest {
+
+ public static void main(String[] args) {
+
+ Calculator calc = new Calculator();
+
+ System.out.println(calc.add(10, 20));
+ System.out.println(calc.add(10, -5));
+ System.out.println(calc.subtract(10, 20));
+ System.out.println(c... | Java | 테스트코드로 작성된 부분이 아닌 것 같아요. |
@@ -0,0 +1,46 @@
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
+
+public class StringCalculatorTest {
+
+ private final StringCalculator calculator = new StringCalculator();
+
+ @Test
+ public void testEmptyString() {
+ assertEquals(0, calculator.add(""));
+ }... | Java | 하나의 테스트는 하나에 대해서만 테스트하면 더 좋을 것 같아요. |
@@ -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 | 감사합니다 🌝 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.