code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -0,0 +1,70 @@
+package christmas.domain.order.menu;
+
+import java.util.Arrays;
+import java.util.Map;
+
+public enum Menu {
+
+ // ๊ธฐํ
+ NONE("์์", 0, MenuType.NONE),
+
+ // ์ํผํ์ด์
+ MUSHROOM_SOUP("์์ก์ด ์คํ", 6_000, MenuType.APPETIZER),
+ TAPAS("ํํ์ค", 5_500, MenuType.APPETIZER),
+ CAESAR_SALAD("์์ ์๋ฌ๋... | Java | ์ ๊ฒฝ์ฐ 1์ ์ํด ์ด๋ฒคํธ์ ์ด๋ฒคํธ๊ฐ ๋ณ๊ฒฝ๋ ์ ์๋ค ๊ฐ์ ํด Menu ์ธํฐํ์ด์ค๋ฅผ ์ ์ธํ ๋ค ์ํผํ์ด์ , ๋ฉ์ธ, ๋์ ํธ, ์๋ฃ๋ณ๋ก ENUM ๊ฐ์ฒด๋ฅผ ๊ฐ๊ฐ ๋ฐ๋ก ์ ์ธํ์ต๋๋ค!
์ฐธ๊ณ ํ์๋ฉด ์ข์ ๊ฒ ๊ฐ์์!
``` java
public interface Menu {
int discount(int day);
String getName();
int getPrice();
}
```
``` java
public enum Appetizer implements Menu {
MUSHROOM_SOUP("์์ก์ด์ํ", 6... |
@@ -0,0 +1,40 @@
+package christmas.domain.order.menu;
+
+import christmas.validator.OrderValidator;
+
+import java.util.Objects;
+
+public class Quantity {
+
+ private final Integer quantity;
+
+ private Quantity(Integer quantity) {
+ validate(quantity);
+ this.quantity = quantity;
+ }
+
+ pu... | Java | int๊ฐ ์๋ Integer๋ก ์ ์ธํด์ฃผ์๋ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค!๐ค |
@@ -0,0 +1,18 @@
+package christmas.domain.discount;
+
+import christmas.domain.order.Day;
+import christmas.domain.order.Order;
+
+public interface Discount {
+
+ public void calculateDiscountAmount(Order order, Day day);
+
+ public void checkIsAvailableDiscount(Order order, Day day);
+
+ public String getNam... | Java | ๋คํ์ฑ์ ์ด์ฉํ๋ ์ ๋ง ์ข์ ๋ฐฉ๋ฒ์ด๋ค์ ๋ฐฐ์ฐ๊ณ ๊ฐ๋๋ค! |
@@ -0,0 +1,119 @@
+package christmas.validator;
+
+import christmas.domain.order.menu.Menu;
+import christmas.dto.request.OrderRequest;
+import christmas.util.InputUtil;
+import christmas.exception.ErrorMessage;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Pattern;
+
+public class InputVa... | Java | ํ์ฌ InputValidator ๊ฐ์ฒด์์ ์ฌ์ฉ๋๋ ๋ฉ์๋๋ค์ ๋๋ถ๋ถ ํน์ ๋๋ฉ์ธ์ ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํด ์ฌ์ฉ๋๊ณ ์๋๋ฐ ์ธ์คํด์ค ๋ฉ์๋๋ก ์ฌ์ฉํ๋๊ฑด ์ด๋ ์ ๊ฐ์?? |
@@ -0,0 +1,40 @@
+package christmas.domain.order.menu;
+
+import christmas.validator.OrderValidator;
+
+import java.util.Objects;
+
+public class Quantity {
+
+ private final Integer quantity;
+
+ private Quantity(Integer quantity) {
+ validate(quantity);
+ this.quantity = quantity;
+ }
+
+ pu... | Java | ํฐ ์๋ฏธ๊ฐ ์๋ ๊ฒ์ ์๋๊ณ , null ์ฒ๋ฆฌ์ ๋๋นํ์ฌ Integer๋ฅผ ์ฌ์ฉํ๊ฒ ๋์์ต๋๋ค. ์ฌ์ค ์
๋ ฅ๊ฐ ๊ฒ์ฆ ๋ก์ง์ด ์ด๋ฏธ ์์ด์ null์ด ๋ค์ด๊ฐ ์ผ์ ์์ ๊ฒ ๊ฐ๊ธฐ๋ ํ๋ค์! |
@@ -0,0 +1,119 @@
+package christmas.validator;
+
+import christmas.domain.order.menu.Menu;
+import christmas.dto.request.OrderRequest;
+import christmas.util.InputUtil;
+import christmas.exception.ErrorMessage;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Pattern;
+
+public class InputVa... | Java | ์ฌํ ํฌ๊ฒ ์๊ฐ์ ์ ํ๋ ๋ถ๋ถ์ธ๋ฐ, ์๋ฌด๋๋ static์ ๋ถ์ฌ์ ์๋ฌด๋ฐ์๋ ์ธ ์ ์๊ฒ ํ๋ ๊ฒ๋ณด๋ค๋ ํ์ํ ๊ณณ์์๋ง ๋ถ๋ฌ์์ ์ฌ์ฉํ๋ ํธ์ด ์ฅ์ ์ด ์๊ฒ ๋ค์! ์ข์ ์๊ฒฌ ๊ฐ์ฌํฉ๋๋ค ๐ |
@@ -0,0 +1,63 @@
+package christmas.controller;
+
+import christmas.domain.PromotionService;
+import christmas.domain.order.Day;
+import christmas.domain.order.Order;
+import christmas.dto.response.DiscountPreviewResponse;
+import christmas.view.InputView;
+import christmas.view.OutputView;
+
+import java.util.function... | Java | ์...! ์ ๊ฐ ์ธํ
๋ฆฌ์ ์ด์ ๋ฉ์๋ ๋ถ๋ฆฌ ๋จ์ถํค์ธ option + command + v๋ฅผ ์์ฃผ ์ฌ์ฉํ๋๋ฐ, ๊ทธ ๊ณผ์ ์์ ์๋์ผ๋ก static ๋ฉ์๋๋ก ์ ์ธ๋ ๊ฒ ๊ฐ์ต๋๋ค. ์ ๋ถ ์ง์์ผ๊ฒ ๋ค์ ๐ |
@@ -0,0 +1,40 @@
+package christmas.domain.order;
+
+import christmas.validator.OrderValidator;
+
+import java.util.Objects;
+
+public class Day {
+
+ private final Integer day;
+
+ private Day(Integer day) {
+ validate(day);
+ this.day = day;
+ }
+
+ public static Day create(Integer day) {
+ ... | Java | ๊ฐ VO์์ ์ด๋ฃจ์ด์ง๋ ๊ฒ์ฆ์ ํ ๊ตฐ๋ฐ์์ ๋ชจ์ ๊ด๋ฆฌํ๋ฉด ํธ๋ฆฌํ ๊ฒ์ด๋ผ ์๊ฐํ์๋๋ฐ, ๋ง์์ฃผ์ ๊ฒ์ฒ๋ผ ์บก์ํ๊ฐ ๊นจ์ง๋ ๋ฌธ์ ๋ ์์ ๋ฟ๋๋ฌ OrderValidator ๊ฐ์ฒด๊ฐ ๋น๋ํด์ง๋ค๋ฉด ๊ฒฐ๊ตญ์ ๋ก์ง์ ๋ถ๋ฆฌํด์ผํ ๊ฒ์ด๊ณ ์ด๋ฌ๋ฉด ํ ๊ณณ์์ ๊ด๋ฆฌํ ์ ์๋ค๋ ์ฅ์ ๋ํ ์ฌ๋ผ์ง ๊ฒ ๊ฐ์ต๋๋ค.
๊ฒฐ๊ตญ์๋ ์ ์ผ ๊ด๋ จ์ฑ์ด ๊น์ VO ๋ด๋ถ์์ ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ํ๋ ๊ฒ์ด ๋ง๊ฒ ๋ค์! ์ข์ ์กฐ์ธ ๊ฐ์ฌํฉ๋๋ค ๐ |
@@ -0,0 +1,74 @@
+package christmas.domain.order;
+
+import christmas.domain.order.menu.Menu;
+import christmas.domain.order.menu.Quantity;
+import christmas.dto.request.OrderRequest;
+import christmas.dto.response.OrderResponse;
+import christmas.util.InputUtil;
+import christmas.validator.OrderValidator;
+
+import ja... | Java | ์ ๋ ์ง๊ธ ๋ดค๋ค์ใ
ใ
ใ
ใ
private ์ ์ธํด์ผ ๋๋๋ฐ ๊น๋จน์ ๊ฒ ๊ฐ์ต๋๋ค ๐คฃ |
@@ -0,0 +1,70 @@
+package christmas.domain.order.menu;
+
+import java.util.Arrays;
+import java.util.Map;
+
+public enum Menu {
+
+ // ๊ธฐํ
+ NONE("์์", 0, MenuType.NONE),
+
+ // ์ํผํ์ด์
+ MUSHROOM_SOUP("์์ก์ด ์คํ", 6_000, MenuType.APPETIZER),
+ TAPAS("ํํ์ค", 5_500, MenuType.APPETIZER),
+ CAESAR_SALAD("์์ ์๋ฌ๋... | Java | ๋ฉ๋ด Enum์๋ ์ด๋ฐ ์์ผ๋ก ์ธํฐํ์ด์ค๋ฅผ ์ ์ฉํ ์ ์๋๋ฐ ์๊ฐํ์ง ๋ชปํ๋ค์! ์ฐธ๊ณ ํ๊ฒ ์ต๋๋ค...! |
@@ -0,0 +1,67 @@
+import { Button, Form, Input, Select, Space } from 'antd';
+import { REVIEW_CYCLE_FORM_NAMES, REVIEW_CYCLE_RULES } from './constants';
+import useMembers from '@apis/review/useMembers';
+import { ReviewCycleRequest } from '@apis/review/type';
+import { ReviewCycle } from '@apis/review/entities';
+
+in... | Unknown | ์๊ธฐ `form`์ ์์ด๋ ๋ ๊ฒ ๊ฐ์์~ |
@@ -0,0 +1,67 @@
+import { Button, Form, Input, Select, Space } from 'antd';
+import { REVIEW_CYCLE_FORM_NAMES, REVIEW_CYCLE_RULES } from './constants';
+import useMembers from '@apis/review/useMembers';
+import { ReviewCycleRequest } from '@apis/review/type';
+import { ReviewCycle } from '@apis/review/entities';
+
+in... | Unknown | ์ค ์ด๋ฐ ๋ฐฉ์์ผ๋ก ํ์ดํ ํ๋ฉด `initialValues`์ ๋ํ ํ์
์ ๋ฐ๋ก ๋ง๋ค์ด์ฃผ์ง ์์๋ ๋๊ณ ์ข๋ค์ ๐ |
@@ -0,0 +1,17 @@
+import { Rule } from 'antd/lib/form';
+
+export const REVIEW_CYCLE_FORM_NAMES = {
+ name: 'name',
+ reviewees: 'reviewees',
+ question: {
+ title: 'title',
+ description: 'description',
+ },
+} as const;
+
+export const REVIEW_CYCLE_RULES: Record<string, Rule[]> = {
+ reviewCycleName: [{ re... | TypeScript | ์๊ธฐ ์์๋ ๋ฐ๋ก ๋นผ์ ์ด์ ๊ฐ ๋ญ๊น์?
`Form.Item`์ `name` ์ธ์๋ ์ฌ์ฉ๋์ง ์๋ ๊ฒ ๊ฐ์๋ฐ `label`์ฒ๋ผ ๋ฐ๋ก ๋ฃ์ด๋ ์ข์๋ณด์ฌ์!
์๋๋ฉด label, name, rule์ ํ๋๋ก ๋ฌถ์ด๋ ์ข์ ๊ฒ ๊ฐ๊ตฌ์! ๊ฐ๋ณ๊ฒ ๋๋ ์๊ฐ ๋จ๊ฒจ๋ด
๋๋ค~ |
@@ -0,0 +1,90 @@
+import { API_PATH } from '@apis/constants';
+import { useQuery } from '@apis/common/useQuery';
+import { ReviewCycle } from './entities';
+import { ReviewCycleRequest, ReviewCycleResponse } from './type';
+import { useDelete, usePost, usePut } from '@apis/common/useMutation';
+import { get } from 'lod... | TypeScript | [์ง๋ฌธ]
`trigger`๋ฅผ ๋ฐ๋ก ๋๊ธฐ์ง ์๊ณ ํจ์๋ก ๋๊ฒจ์ฃผ๋ ์ด์ ๋ ํ์
์ ๊ณ ์ ์ํค๊ธฐ ์ํจ์ผ๊น์? |
@@ -0,0 +1,37 @@
+import useModal from 'hooks/useModal';
+import { Headline4 } from 'styles/typography';
+import ReviewCycleForm from '../ReviewCycleForm';
+import { message } from 'antd';
+import { useCreateReviewCycle, useGetReviewCycles } from '@apis/review/useReviewCycles';
+
+function useReviewCycleCreateModal() {... | Unknown | ์๋ฐ ์์ผ๋ก ๊ธฐ์กด `modal`์ ํ์ฅํ๋ ํ
์ผ๋ก ๋ง๋ค์ด๋ ์ข์ ๊ฒ ๊ฐ์์~
```suggestion
return {
...modal,
render,
};
``` |
@@ -0,0 +1,25 @@
+import { DeleteOutlined } from '@ant-design/icons';
+import { useDeleteReviewCycle, useGetReviewCycles } from '@apis/review/useReviewCycles';
+import { message } from 'antd';
+
+function DeleteButton({ entityId }: { entityId: number }) {
+ const { refetchReviewCycle } = useGetReviewCycles();
+ const... | Unknown | [์ง๋ฌธ]
`e.stopPropagation()`์ ์๋๊ฐ ๋ฌด์์ธ๊ฐ์? |
@@ -0,0 +1,10 @@
+import { Member, ReviewCycle } from './entities';
+
+export type ReviewCycleRequest = {
+ name: ReviewCycle['name'];
+ reviewees: Member['entityId'][];
+ title: string;
+ description: string;
+};
+
+export type ReviewCycleResponse = Pick<ReviewCycle, 'entityId'>; | TypeScript | [์ ์]
์ด๊ฒ๊ณผ entities์ ํ์
์ ์ผ๋ถ ๊ณตํต์ผ๋ก ์ฌ์ฉํด๋ณผ ์๋ ์์ผ๋ ค๋์? ๊ฐ์ ๋งฅ๋ฝ์ ๋ด๊ณ ์๋ ํ์
์ธ๋ฐ ๋งฅ๋ฝ์ด ์์ ๋ถ๋ฆฌ๋์ด์ ๋์ค์ ์ ์ง๋ณด์ํ ๋ ์ฃผ์ํด์ผ๊ฒ ๋ค๋ ์๊ฐ์ด ๋๋ค์ |
@@ -0,0 +1,67 @@
+import { Button, Form, Input, Select, Space } from 'antd';
+import { REVIEW_CYCLE_FORM_NAMES, REVIEW_CYCLE_RULES } from './constants';
+import useMembers from '@apis/review/useMembers';
+import { ReviewCycleRequest } from '@apis/review/type';
+import { ReviewCycle } from '@apis/review/entities';
+
+in... | Unknown | [์ ๊ทน]
ui๋ฅผ ๋ ๋๋งํ๊ธฐ ์ํ buttonProps๊ฐ ๊ฐ์ฒดํํ๋ก ๋ด๋ ค๊ฐ๋ฉด ๋์ค์ ์ ์ง๋ณด์์ฐจ์์์ ์ด๋ ค์์ด ์์ ๊ฒ ๊ฐ์๋ฐ ๋ฐฉ๋ฒ์ด ์์ผ๋ ค๋์??
confirmButtonProps๋ deleteButtonProps๋ Form์ด๋ผ๋ ๋งฅ๋ฝ์์๋ ์์ ๋ค์ด๊ฐ๋ ๋ ๊ฒ ๊ฐ๋ค๊ณ ํ๋จํ ์๋ ์์ผ๋ ์ค์ ๋ ๋ํ๋ ์ชฝ์์๋ prop์ ๊บผ๋ด์ฐ๋ ์ฐจ์์ ๋ถ๊ณผํด์ ์ด๋ป๊ฒ๋ ๋ถ๋ฆฌ๊ฐ ๋๋ฉด ์ข๊ฒ ๋ค๋ ์๊ฐ์ด ๋ค์ด์. |
@@ -0,0 +1,28 @@
+import { faker } from '@faker-js/faker';
+import { personList } from '@mocks/auth/data';
+import { v4 as uuidv4 } from 'uuid';
+
+const personCount = personList.length;
+
+export const reviewCycleList = Array.from({ length: 10 }, (_, i) => ({
+ entityId: uuidv4(),
+ name: faker.lorem.words(),
+ cre... | TypeScript | `faker` ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ ์ ํ ์ ์ฐ์๋ค์ ๐ |
@@ -0,0 +1,25 @@
+import { DeleteOutlined } from '@ant-design/icons';
+import { useDeleteReviewCycle, useGetReviewCycles } from '@apis/review/useReviewCycles';
+import { message } from 'antd';
+
+function DeleteButton({ entityId }: { entityId: number }) {
+ const { refetchReviewCycle } = useGetReviewCycles();
+ const... | Unknown | [์ ๊ทน]
๋ฒํผ์ธ๋ฐ ๋ฒํผ์ด ์๋ ์ปดํฌ๋ํธ๊ฐ ๋ ๊ฒ ๊ฐ์์.
์์ด์ฝ์ ํด๋ฆญ์ด๋ฒคํธ๋ฅผ ๋ค๋ ๊ฒ์ ๋ํด์๋ ์ด๋ป๊ฒ ์๊ฐํ์๋์ฉ? role=button์ด ๋๋๋ก ํด์ผํ๋ ํ๋ ํ๋จ์ด ๋๋ค์ |
@@ -0,0 +1,163 @@
+import { Person, personIDMap, personMap } from './../auth/data';
+import { API_PATH } from '@apis/constants';
+import { personList } from '@mocks/auth/data';
+import { HttpResponse, http } from 'msw';
+import { reviewCycleList } from './data';
+import { ReviewCycleRequest } from '@apis/review/type';
... | TypeScript | ์ฌ๊ธฐ๋ ์ค์ฝํ๊ฐ ๋์ผ๋ `r`๋ณด๋ค๋ `reviewCycle`์ผ๋ก ๋ค์ด๋ฐ ํ๋ ๊ฒ์ด ์ข์ ๊ฒ ๊ฐ์์~ |
@@ -0,0 +1,43 @@
+import { Button } from 'antd';
+import { RoundContent } from 'components/common/RoundContent';
+import useReviewCycleCreateModal from './ReviewCycleModals/useReviewCycleCreateModal';
+import ReviewCycleTable from './ReviewCycleTable';
+import useReviewCycleUpdateModal from './ReviewCycleModals/useRevi... | Unknown | [์ ๊ทน]
์ธ์คํด์ค๋ camelcase๊ฐ ๋๋ฉด ์ข๊ฒ ์ต๋๋ค! |
@@ -0,0 +1,163 @@
+import { Person, personIDMap, personMap } from './../auth/data';
+import { API_PATH } from '@apis/constants';
+import { personList } from '@mocks/auth/data';
+import { HttpResponse, http } from 'msw';
+import { reviewCycleList } from './data';
+import { ReviewCycleRequest } from '@apis/review/type';
... | TypeScript | `r`์ด ์ค๋ณต ๋ณ์๋ผ ์ฌ๊ธฐ๋ `m`์ด ๋์๊ตฐ์..
`r`์ `reviewCycle`๋ก ๋ฐ๊พธ๋ฉด ์ฌ๊ธฐ๋ `r`์ด์ด๋ ๊ด์ฐฎ์๋ณด์
๋๋ค. ํน์ ์ข ๋ ๋ช
ํํ `reviewee`์ด๋ ์ข๊ฒ ๊ตฌ์!
์ทจํฅ ์ฐจ์ด์ผ ์ ์๊ฒ ์ง๋ง ๊ฐ์ธ์ ์ผ๋ก๋ ํ ์ค ์ ๋์ ์ค์ฝํ์ผ ๋๋ ์ถ์ฝ ๋ณ์ ์ฌ์ฉํด๋ ํฌ๊ฒ ๊ฐ๋
์ฑ์ ํด์น์ง ์์ ๊ด์ฐฎ๋ค๊ณ ์๊ฐํด์~ |
@@ -0,0 +1,163 @@
+import { Person, personIDMap, personMap } from './../auth/data';
+import { API_PATH } from '@apis/constants';
+import { personList } from '@mocks/auth/data';
+import { HttpResponse, http } from 'msw';
+import { reviewCycleList } from './data';
+import { ReviewCycleRequest } from '@apis/review/type';
... | TypeScript | [์ ์]
์๋๋ก `push`๋ฅผ ํ๋ฉด ๋งจ ๋ค์ ๋ค์ด๊ฐ๊ฒ ๋ผ์ ์ต์ ์์ผ๋ก ๋ณด์ด์ง ์๊ฒ ๋๋๋ผ๊ตฌ์~
์ ๋ ฌ์ ํ ๋ฒ ํด ์ฃผ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,10 @@
+import { Member, ReviewCycle } from './entities';
+
+export type ReviewCycleRequest = {
+ name: ReviewCycle['name'];
+ reviewees: Member['entityId'][];
+ title: string;
+ description: string;
+};
+
+export type ReviewCycleResponse = Pick<ReviewCycle, 'entityId'>; | TypeScript | ์ ์๋์ฒ๋ผ ํ์ดํํ๋ฉด ๊ฐ์ ๋งฅ๋ฝ์์ด ์ ๋๋ฌ๋๋ ค๋์?
```ts
export type ReviewCycleRequest = {
name: ReviewCycle['name'];
reviewees: Member['entityId'][];
title: string;
description: string;
};
export type ReviewCycleResponse = Pick<ReviewCycle, 'entityId'>;
``` |
@@ -0,0 +1,90 @@
+import { API_PATH } from '@apis/constants';
+import { useQuery } from '@apis/common/useQuery';
+import { ReviewCycle } from './entities';
+import { ReviewCycleRequest, ReviewCycleResponse } from './type';
+import { useDelete, usePost, usePut } from '@apis/common/useMutation';
+import { get } from 'lod... | TypeScript | ์ด ๋ถ๋ถ์ SWR ๊ธฐ๋ฐ์ ์ธํฐํ์ด์ค(trigger)๋ฅผ ๊ฐ์ถ๊ณ ์ธํฐํ์ด์ค๋ฅผ ํต์ผํ๊ธฐ ์ํ ๋ชฉ์ ์ด์์ด์. ์ถํ์ SWR์ tanstack-query ๋ฑ ๋ค๋ฅธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ก ๋ณ๊ฒฝํ๋๋ผ๋ ๋์ผํ๊ฒ createReviewCycle ์ธํฐํ์ด์ค๋ฅผ ์ฌ์ฉํ๋๋ก ํด์ ์ฌ์ฉ์ฒ์์๋ ์ฝ๋๋ฅผ ์์ ํ ํ์๊ฐ ์๋๋ก ํ๊ณ ์ ํ์ต๋๋ค. |
@@ -0,0 +1,17 @@
+import { Rule } from 'antd/lib/form';
+
+export const REVIEW_CYCLE_FORM_NAMES = {
+ name: 'name',
+ reviewees: 'reviewees',
+ question: {
+ title: 'title',
+ description: 'description',
+ },
+} as const;
+
+export const REVIEW_CYCLE_RULES: Record<string, Rule[]> = {
+ reviewCycleName: [{ re... | TypeScript | ํด๋น form์ ์์๊ฐ ์ด๋ป๊ฒ ๊ตฌ์ฑ๋์ด ์๋์ง ํ๋์ ํ์
ํ๊ธฐ ์ฝ์ง ์์๊น ํ์๋๋ฐ, ํ๋์ ๊ฐ์ฒด๋ก ๋ฌถ๋๊ฒ ๋์์ผ๋ ค๋ ์ถ๊ตฐ์! |
@@ -0,0 +1,25 @@
+import { DeleteOutlined } from '@ant-design/icons';
+import { useDeleteReviewCycle, useGetReviewCycles } from '@apis/review/useReviewCycles';
+import { message } from 'antd';
+
+function DeleteButton({ entityId }: { entityId: number }) {
+ const { refetchReviewCycle } = useGetReviewCycles();
+ const... | Unknown | ํ์ฌ ํ
์ด๋ธ onRowClick ์ ๋ฆฌ๋ทฐ ์ฌ์ดํด ์์ ๋ชจ๋ฌ์ด ์ด๋ฆฌ๋๋ก ์ด๋ฒคํธ๋ฅผ ๋ฑ๋กํด๋์๋๋ฐ์, ์ญ์ ๋ฒํผ ์์๋ ์ด๋ฒคํธ ์ ํ๋ฅผ ๋ง๋๋ก ํ์ต๋๋ค. |
@@ -0,0 +1,25 @@
+import { DeleteOutlined } from '@ant-design/icons';
+import { useDeleteReviewCycle, useGetReviewCycles } from '@apis/review/useReviewCycles';
+import { message } from 'antd';
+
+function DeleteButton({ entityId }: { entityId: number }) {
+ const { refetchReviewCycle } = useGetReviewCycles();
+ const... | Unknown | ๋ต button์ผ๋ก ๊ฐ์ธ๋๊ฒ ์ข๊ฒ ๊ตฐ์.
> ๋ฐ์ํ์ต๋๋ค! [refactor: ์ญ์ ๋ฒํผ ๊ตฌ์กฐ ๋ณ๊ฒฝ](https://github.com/lemonbase-labs/journee-on-boarding-project/pull/7/commits/2201091e80c11c71bb97c3cf131410067cb04478) |
@@ -0,0 +1,67 @@
+import { Button, Form, Input, Select, Space } from 'antd';
+import { REVIEW_CYCLE_FORM_NAMES, REVIEW_CYCLE_RULES } from './constants';
+import useMembers from '@apis/review/useMembers';
+import { ReviewCycleRequest } from '@apis/review/type';
+import { ReviewCycle } from '@apis/review/entities';
+
+in... | Unknown | ์ํ.. ์ ๋ ์ง๊ด์ ์ด๋ผ๊ณ ์๊ฐํ๋๋ฐ, ์ ์ง๋ณด์ ์ฐจ์์์ ์ด๋ค ์ด๋ ค์์ธ์ง ํน์ ์ด๋ป๊ฒ ๋ถ๋ฆฌ๋์ด์ผ ํ๋์ง ์ข ๋ ์ค๋ช
ํด์ฃผ์ค ์ ์์๊น์?
์ค์ ๋ก ํ์ฌ ๋ ๋ชฌ๋ฒ ์ด์ค ๋ชจ๋ฌ ํ
์ธ useBasicModal๋ ๋น์ทํ ํจํด์ผ๋ก ์ฌ์ฉํ๊ณ ์๋๋ฐ, ์ ๋ ์ ์ง๋ณด์ ์ฐจ์์์ ์ด๋ ค์์ด ์์ด์ ๊ฐ์ ํด์ผ ํ๋ค๊ณ ์๊ฐํ์ง ์์์ด์์! |
@@ -0,0 +1,43 @@
+import { Button } from 'antd';
+import { RoundContent } from 'components/common/RoundContent';
+import useReviewCycleCreateModal from './ReviewCycleModals/useReviewCycleCreateModal';
+import ReviewCycleTable from './ReviewCycleTable';
+import useReviewCycleUpdateModal from './ReviewCycleModals/useRevi... | Unknown | ๋ค!! ๋ฐ์ํ์ต๋๋ค!
[refactor: ์ธ์คํด์ค camelcase๋ก ์์ ](https://github.com/lemonbase-labs/journee-on-boarding-project/pull/7/commits/3a4fecb79aa6c1a53951900d79c308af0a87d940) |
@@ -0,0 +1,90 @@
+import { API_PATH } from '@apis/constants';
+import { useQuery } from '@apis/common/useQuery';
+import { ReviewCycle } from './entities';
+import { ReviewCycleRequest, ReviewCycleResponse } from './type';
+import { useDelete, usePost, usePut } from '@apis/common/useMutation';
+import { get } from 'lod... | TypeScript | ์คํธ ์ธํฐํ์ด์ค ํต์ผ ๋ชฉ์ ! ์ดํดํ์ต๋๋ค~
๊ณ ๋ ๋ค๋ฉด ๊ฐ์ ํ์ผ [L87](https://github.com/lemonbase-labs/journee-on-boarding-project/pull/7/files#diff-3ab91e36eb619267b0f18915f2e642a8452aece2c4e8220b0bce854dc2e8d68eR87)์ `deleteReviewCycle: trigger`๋ ์ ์ฒ๋ฆฌ๊ฐ ๋๋ฝ๋ ๊ฒ ๊ฐ์ ๊ฐ์ด ๋ฐ์ํ๋ฉด ์ข์ ๊ฒ ๊ฐ์์~ |
@@ -1 +1,30 @@
-# java-lotto ๊ฒ์
+# java-Lotto ๊ฒ์
+
+# ๊ตฌํ ๊ธฐ๋ฅ ๋ชฉ๋ก
+
+- [x] ๊ตฌ์
๊ธ์ก ์
๋ ฅ๋ฐ๊ธฐ
+ - [x] 1000์ ๋ฏธ๋ง ์
๋ ฅ ์ ์ฒ๋ฆฌ
+ - [x] 1000์ ๋ฐฐ์ ์๋ ๊ฐ ์
๋ ฅ ์ ์ฒ๋ฆฌ
+ - [x] ์ซ์๊ฐ ์๋ ๊ฐ (๋ฌธ์์ด)
+ - [x] ์ ์๊ฐ ์ฒ๋ฆฌ
+ - [x] ๊ณต๋ฐฑ ์ฒ๋ฆฌ
+- [x] ๊ตฌ๋งค ๊ฐ์ ๊ตฌํ๊ธฐ
+- [x] ๋๋ค ๋ก๋๋ฒํธ ๊ตฌ๋งค ๊ฐ์๋งํผ ๋ง๋ค๊ธฐ
+ - [x] defaultNumberSet 1๋ฒ๋ง ์์ฑ๋๋๋ก ๋ณ๊ฒฝ
+ - [x] RandomLottoTest ์์ ๋ฆฌ... | Unknown | ๊ตฌํ ๊ธฐ๋ฅ ๋ชฉ๋ก ์์ฑ ๐ |
@@ -10,6 +10,13 @@ repositories {
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter:5.6.0')
testImplementation('org.assertj:assertj-core:3.15.0')
+
+ compileOnly 'org.projectlombok:lombok:1.18.20'
+ annotationProcessor 'org.projectlombok:lombok:1.18.20'
+
+ testCompileOnly 'org.proj... | Unknown | ๋กฌ๋ณต ํ๋ฌ๊ทธ์ธ์ ํ์ฉํ์
จ๋ค์! |
@@ -0,0 +1,24 @@
+package lotto.controller;
+
+import lotto.domain.dto.LottoResult;
+import lotto.domain.dto.PurchaseInput;
+import lotto.domain.dto.PurchaseResult;
+import lotto.domain.dto.WinningLottoInput;
+import lotto.service.LottoService;
+
+public class LottoController {
+
+ private final LottoService lottoSe... | Java | MVC ํจํด์ ์ด์ฉํด ๋ฌธ์ ๋ฅผ ํ๋ ค๊ณ ์๋ํ์
จ๋ค์!
๋ค๋ง Model - View - Controller ์ญํ ๋ถ๋ฆฌ๊ฐ ๋ช
ํํ๊ฒ ๋์ด์์ง ์์
ํ์ฌ Controller๊ฐ View๋ฅผ ์ง์ ํ์ฉํ๋ ๋ฐฉ์์ผ๋ก ์ฝ๋ ๊ตฌํ์ด ๋์ด์๋๋ฐ์.
๊ฐ์์ ์ญํ ๊ณผ ์ฑ
์์ ๋ฌด์์ด๊ณ , ์ด๋ฅผ ์ด๋ป๊ฒ ๋
๋ฆฝ์ ์ผ๋ก ๋ถ๋ฆฌํด๋ผ ์ ์์ ์ง, ๋ ์ ๊ทธ๋ฌํ์ฌ์ผ ํ๋์ง ๊ณ ๋ฏผํด๋ณด์๋ฉด ์ข๊ฒ ์ต๋๋ค. ํ์ฌ๋ `LottoController.start()` ๋ `LottoApplication`์ main๊ณผ ๊ฐ์ ์ญํ ๋ก ๋ณด์ด๋ค์. |
@@ -0,0 +1,31 @@
+package lotto.view;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Scanner;
+import java.util.stream.Collectors;
+
+public class ConsoleInputView implements InputView {
+
+ private static final String LOTTO_NUMBERS_INPUT_DELIMITER = ",";
+
+ private final Scanner scanner =... | Java | ๊ณผํ(๋ถํ์ํ) ๋ฉ์๋ ํฌ์ฅ์
๋๋ค. |
@@ -0,0 +1,86 @@
+package lotto.view;
+
+import lotto.domain.*;
+import lotto.domain.dto.LottoResult;
+
+public class ConsoleOutputView implements OutputView {
+
+ private static final String ERROR_HEADER = "[ERROR] ";
+
+ private void print(String contents) {
+ System.out.println(contents);
+ }
+
+ ... | Java | line 9 to 13
๋๋ฌด ๋ช
ํํ ๊ฐ๋ค์ด ๊ณผํ๊ฒ ์์๋ก ๋ง๋ค์ด์ก์ต๋๋ค.
๋ชจ๋ literal value๊ฐ ๋์ ๊ฒ์ ์๋๋๋ค. ^^; |
@@ -0,0 +1,33 @@
+package lotto.service;
+
+import lotto.domain.*;
+import lotto.domain.dto.LottoResult;
+import lotto.domain.dto.PurchaseInput;
+import lotto.domain.dto.PurchaseResult;
+import lotto.domain.dto.WinningLottoInput;
+
+public class LottoService {
+
+ public PurchaseResult purchase(PurchaseInput purchas... | Java | PurchaseCount ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ ์ด ์์ ์ ์ ํจ์ฑ ๊ฒ์ฆ์ด ํด๋น ๊ฐ์ฒด ์์ฑ์์์ ์งํ๋๋๋ฐ์,
์ปจํธ๋กค๋ฌ ๋ ์ด์ด์์ ์ฌ์ฉ์์ ์
๋ ฅ ๊ฐ์ ์ ํจ์ฑ์ ๋จผ์ ๊ฒ์ฆํ ์ ์์ง ์์๊น์?
๊ณ ๋ฏผํด๋ณผ ๊ฑฐ๋ฆฌ: ์ ํจ์ฑ ๊ฒ์ฆ์ ์ด๋ค ๋ ์ด์ด์์ ์งํ๋์ด์ผํ ๊น? |
@@ -0,0 +1,19 @@
+package lotto.exception;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lotto.domain.Lotto;
+
+@RequiredArgsConstructor
+public enum ExceptionMessage {
+
+ NON_NUMBER_INPUT("์ซ์๋ฅผ ์
๋ ฅํด์ฃผ์ธ์."),
+ LESS_THAN_LOTTO_PRICE_INPUT_FOR_PURCHASE_MONEY("๊ตฌ์
๊ธ์ก์ " + Lotto.PRICE + " ์ด์์ ๊ฐ... | Java | ์์ธ ๋ฉ์์ง๋ฅผ ๋ณ๋๋ก ๋ถ๋ฆฌํด์ ํ ๊ณณ์์ ๊ด๋ฆฌํ๊ณ ์๋ค์!
ํ์ฌ๋ IllegalArgumentException๋ง์ ์ฌ์ฉํ๊ณ ๋ฉ์์ง๋ก ํน์ ์์ธ์ ๋ํด์ ์ฒ๋ฆฌํ๊ณ ์๋๋ฐ์,
๊ตฌ์ฒด์ ์ธ CustomException์ ๋ง๋ค๊ณ ์ํฉ์ ๋ฐ๋ผ ์ด๋ฅผ ๋์ ธ ํด๋น Exception์ ํ์ฉํ๋ ๋ฐฉ๋ฒ๋ ์๊ฐํด๋ณผ ์ ์์ต๋๋ค. |
@@ -0,0 +1,53 @@
+package lotto.domain;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+import static lotto.exception.ExceptionMessage.OUT_OF_BOUND_INPUT_FOR_LOTTO_NUMBER;
+
+public class LottoNumber {
+
+ public static final int LOWER_BOUND = 1;
+ public static final int UPPER_BOUND = 45;
+
+ @Getter... | Java | `isInteger` ๋ ์ง๋
ํ๋ฉด ์ ์์ธ๊ฐ? ๋ ํ๋จ๋ฌธ์
๋๋ค.
๋ค๋ง ๋ด์ฉ์ ๋ณด๋ 0~9๊น์ง ์ซ์ ์ฆ ์์ด ์๋ ์ ์์ธ์ง๋ฅผ ์ ๊ทํํ์์ ์ด์ฉํด ํ๋จํ๊ณ ์๋ค์.
isNonNegativeInteger ์ ๋๋ก ๋ ์ ํํ๊ฒ ํํํด๋ณด๋ฉด ์ด๋จ๊น์?
```suggestion
if (!isNonNegativeInteger(input)) {
``` |
@@ -0,0 +1,35 @@
+package lotto.domain;
+
+import lombok.Builder;
+import lombok.Getter;
+
+import static lotto.exception.ExceptionMessage.LESS_THAN_LOTTO_PRICE_INPUT_FOR_PURCHASE_MONEY;
+import static lotto.exception.ExceptionMessage.NON_MULTIPLE_OF_LOTTO_PRICE_INPUT_FOR_PURCHASE_MONEY;
+
+public class PurchaseCount {... | Java | `isInteger` ๋ ์ง๋
ํ๋ฉด ์ ์์ธ๊ฐ? ๋ ํ๋จ๋ฌธ์
๋๋ค.
๋ค๋ง ๋ด์ฉ์ ๋ณด๋ 0~9๊น์ง ์ซ์ ์ฆ ์์ด ์๋ ์ ์์ธ์ง๋ฅผ ์ ๊ทํํ์์ ์ด์ฉํด ํ๋จํ๊ณ ์๋ค์.
isNonNegativeInteger ์ ๋๋ก ๋ ์ ํํ๊ฒ ํํํด๋ณด๋ฉด ์ด๋จ๊น์?
```suggestion
if (!isNonNegativeInteger(input)) {
``` |
@@ -0,0 +1,35 @@
+package lotto.domain;
+
+import lombok.Builder;
+import lombok.Getter;
+
+import static lotto.exception.ExceptionMessage.LESS_THAN_LOTTO_PRICE_INPUT_FOR_PURCHASE_MONEY;
+import static lotto.exception.ExceptionMessage.NON_MULTIPLE_OF_LOTTO_PRICE_INPUT_FOR_PURCHASE_MONEY;
+
+public class PurchaseCount {... | Java | `notMatchesCondition` ํํ์ด ๋ชจํธํ๊ณ ๋ ๊ฐ์ง ์๋ก ๋ค๋ฅธ ์ผ์ ํ๊ณ ์์ต๋๋ค.
1. ์
๋ ฅ์ด ๋ก๋๋ฅผ ๊ตฌ๋งคํ ์ ์๋ ์ต์ ๊ฐ(1000)๋ฏธ๋ง์ธ์ง ๊ฒ์ฆ
2. ์ ํํ ํฐ์ผ ๊ฐ๊ฒฉ์ ๋ฐฐ์์ธ์ง ๊ฒ์ฆ
1์ ์ํฉ์ 2์ ๋ถ๋ถ์งํฉ์ผ๋ก ์๊ฐํ์ฌ ๊ตฌํํ์ ๊ฒ์ผ๋ก ์ถ์ธก๋๋๋ฐ,
์ฌ์ฉ์์๊ฒ ์คํจ์ ๋ํ ๋ ์ ํํ ์๋ฌ๋ฅผ ๊ตฌ๋ถํ์ฌ ๋
ธ์ถํ๋ ๊ฒ์ด ์ข์ง ์์๊น์? |
@@ -0,0 +1,17 @@
+package lotto.domain;
+
+import lombok.Builder;
+import lombok.Getter;
+import lotto.domain.dto.WinningLottoInput;
+
+public class WinningLotto extends Lotto {
+
+ @Getter
+ private final LottoNumber bonusNumber;
+
+ @Builder
+ public WinningLotto(WinningLottoInput winningLottoInput) throw... | Java | ์ฌ์ฉ์ ์
๋ ฅ(InputView)์ ๋ํ ํ์ฑ๊ณผ ๊ฒ์ฆ์ด ์๋น์ค ๋ ์ด์ด๋ฅผ ํต๊ณผํด ๋๋ฉ์ธ ๋ชจ๋ธ๊น์ง ์นจํฌํ์ต๋๋ค.
์ด๋ฅผ ๋ด๋นํ๋ ์์ญ์ธ ์ปจํธ๋กค๋ฌ ๋ ์ด์ด์์ ์ ์์
์ ๋ชจ๋ ๋ง๋ฌด๋ฆฌ์ง์ด์ผํฉ๋๋ค.
๊ฐ๊ธ์ ๋๋ฉ์ธ ๋ชจ๋ธ์ ์ฌ์ฉ์ ์
๋ ฅ ๋ฐฉ์๊ณผ ๋
๋ฆฝ์ ์ด์ด์ผํฉ๋๋ค.
์ด๋ค ๋ทฐ๋ฅผ ํตํด ์ ๊ทผํ๋ ๋๋ฉ์ธ์ ๊ทธ ์์ฒด๋ก ๋ฌธ์ ์์ญ๋ง์ ํํํ๊ณ ํด๊ฒฐํ๋ ๋ ์ด์ด์ด์ด์ผํฉ๋๋ค. |
@@ -0,0 +1,53 @@
+package lotto.domain;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+import static lotto.exception.ExceptionMessage.OUT_OF_BOUND_INPUT_FOR_LOTTO_NUMBER;
+
+public class LottoNumber {
+
+ public static final int LOWER_BOUND = 1;
+ public static final int UPPER_BOUND = 45;
+
+ @Getter... | Java | LottoNumber๋ฅผ ์์ฑํ ๋ String์ผ๋ก ์์ฑํ ํ์๊ฐ ์์๊น์?
String type์ผ๋ก ๋ฐ๋ค๋ณด๋ ํ๋ณํ๊น์ง ์ฑ
์์ ธ์ผํ๋ ์ํฉ์ด ๋์๋ค์. |
@@ -0,0 +1,17 @@
+package lotto.domain;
+
+import lombok.Builder;
+import lombok.Getter;
+import lotto.domain.dto.WinningLottoInput;
+
+public class WinningLotto extends Lotto {
+
+ @Getter
+ private final LottoNumber bonusNumber;
+
+ @Builder
+ public WinningLotto(WinningLottoInput winningLottoInput) throw... | Java | ๋ฐ๋ณต๋ฌธ๊ณผ ์กฐ๊ฑด๋ฌธ์ ์ค์ฒฉํด์ ๋ก์ง์ด ๋ณต์กํ๋ค์.
๋ ๋์ ๋ฐฉ์์ผ๋ก ๋ฆฌํฉํ ๋ง์ ํด์ผ๊ฒ ์ฃ ? |
@@ -0,0 +1,55 @@
+package lotto.domain;
+
+import lombok.Getter;
+
+@Getter
+public enum Prize {
+
+ FIRST(6, false, 2000000000),
+ SECOND(5, true, 30000000),
+ THIRD(5, false, 1500000),
+ FOURTH(4, false, 50000),
+ FIFTH(3, false, 5000),
+ LOSE(2, false, 0);
+
+ private final int matchNumbersCount... | Java | Enum ํ์ฉ ๐ |
@@ -0,0 +1,35 @@
+package lotto.domain;
+
+import lombok.Getter;
+
+@Getter
+public class PrizeCount {
+
+ private int first;
+ private int second;
+ private int third;
+ private int fourth;
+ private int fifth;
+
+ public void addPrize(Prize prize) {
+ if (prize == Prize.FIRST) {
+ ... | Java | ์ด ํด๋์ค์ ์ด๋ฆ์ด Prize**Count**์ด๋
line 9 to 13 count ๋ ์ค๋ณต์ฒ๋ผ ๋๊ปด์ง๋ค์. ๋ ๋จ์ํ๊ฒ ๋ค์ด๋ฐํด๋ ์๋ฏธ ์ ๋ฌ์ ๋ฌด๋ฆฌ ์์ด๋ณด์
๋๋ค. |
@@ -0,0 +1,17 @@
+package lotto.domain;
+
+import lombok.Builder;
+import lombok.Getter;
+import lotto.domain.dto.WinningLottoInput;
+
+public class WinningLotto extends Lotto {
+
+ @Getter
+ private final LottoNumber bonusNumber;
+
+ @Builder
+ public WinningLotto(WinningLottoInput winningLottoInput) throw... | Java | 1. ๋ค์ด๋ฐ์์ Condition๊ณผ ๊ฐ์ ๋ชจํธํ ๋จ์ด๋ฅผ ์ฌ์ฉํ๋ฉด ์ข์ง ์์ต๋๋ค. ๋ ๊ตฌ์ฒด์ ์ธ ํํ์ ์ฌ์ฉํ๋๋ก ํฉ์๋ค.
2. find๋ผ๋ ํํ๊ณผ get์ด๋ผ๋ ํํ ์ฌ์ด์ ๋ฏธ๋ฌํ ์ฐจ์ด๊ฐ ์์ต๋๋ค. ์ด๋ค ์ฐจ์ด์ธ์ง๋ ์ฐพ์์ ๊ณต๋ถํ๊ณ ์ ์๊ฒ๋ ๊ณต์ ํด์ฃผ์ธ์. |
@@ -0,0 +1,22 @@
+package lotto.domain;
+
+import lombok.Builder;
+import lombok.Getter;
+
+public class LottoStatistics {
+
+ @Getter
+ private final PrizeCount prizeCount;
+ private final PurchaseCount purchaseCount;
+
+ @Builder
+ public LottoStatistics(PrizeCount prizeCount, PurchaseCount purchaseCou... | Java | ํต๊ณ๋ฅผ ๋ด๋ ๊ฐ์ฒด๋ฅผ ๋ง๋ ๊ฒ ์์ฃผ ์ข์ต๋๋ค ๐ |
@@ -0,0 +1,21 @@
+import React from 'react';
+
+class InputBox extends React.Component {
+ // eslint-disable-next-line no-useless-constructor
+ constructor(props) {
+ super(props);
+ }
+ render() {
+ const { name, type, placeholder, recivedValue } = this.props;
+ return (
+ <input
+ name={name}... | JavaScript | ์ด๋ถ๋ถ ์ ์ฃผ์์ฒ๋ฆฌํ์
จ๋์?
์ด๋ ๊ฒ ์์ฐ๋ ์ฝ๋๋ฅผ ์ฃผ์์ฒ๋ฆฌํด์ ๋จ๊ฒจ๋๋ฉด ๋ค๋ฅธ์ฌ๋๋ ์ด ์ฝ๋๊ฐ ์ด๋์ ์ฐ์ด๋๊ฑด๊ฐ ํด์ ๋ชจ๋ ๋ชป์ง์ฐ๊ณ ๊ฒฐ๊ตญ ์๋ฌด ์ธ๋ชจ ์์ง๋ง ๊ณ์ ์ ํด ๋ด๋ ค๊ฐ๋ ์ฃผ์์ฝ๋๊ฐ ๋ฉ๋๋ค
ํ์์๋ ์ฝ๋๋ ์ญ์ ํด์ฃผ์ธ์!
์ปค๋ฐ๋ง ์ ๋จ๊ฒจ๋๋ฉด ๋ค์ ๋์์ฌ ์ ์์ผ๋๊น ๊ณผ๊ฐํ๊ฒ ์ง์๋ ๋ฉ๋๋ค! |
@@ -0,0 +1,21 @@
+import React from 'react';
+
+class InputBox extends React.Component {
+ // eslint-disable-next-line no-useless-constructor
+ constructor(props) {
+ super(props);
+ }
+ render() {
+ const { name, type, placeholder, recivedValue } = this.props;
+ return (
+ <input
+ name={name}... | JavaScript | ```suggestion
const {name, type, placeholder, recivedValue} = this.props;
return (
<input
name={name}
type={type}
placeholder={placeholder}
onChange={recivedValue}
/>
);
```
๊ตฌ์กฐ๋ถํดํ ๋นํด์ ์ฐ๋ฉด ์ข ๋ ๊น๋ํ๊ฒ ๋ค์ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | import ์์ ๋ง์ถฐ์ฃผ์ธ์ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | peer review์ ํ์ต์๋ฃ๋ก ์ ๊ณต๋ ๋ฆฌํฉํ ๋ง ์ฒดํฌ๋ฆฌ์คํธ ํ์ธํด๋ณด์๋ฉด ๋ฉ๋๋ค. |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | [๊ณต์๋ฌธ์ 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. ์๊ฐ์ด ์ง... |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | ์ฃผ์ ์ญ์ ํด์ฃผ์ธ์~ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | ```suggestion
const { name, value } = e.target;
this.setState({[name]:value});
}
```
๊ณ์ฐ๋ ์์ฑ๋ช
์ฌ์ฉํด์ ์ค์ผ ์ ์์ด๋ณด์
๋๋ค, passwordCheck, userIdCheck๋ ํ์์๋ ๊ฐ์ด๋๊น ์์ ๋ ๋๋ณด์
๋๋ค.
๊ทธ๋ฆฌ๊ณ check๋ ๋ญ๊ฐ ์ฒดํฌ๋ฐ์ค๊ฐ ์ฒดํฌ๋๊ณ ์๋๊ณ ๊ฐ์ง ์๋์? isPasswordValid ๋ฑ์ ์๋ฏธ๊ฐ ๋๋ฌ๋๊ณ , boolean์์ ์์๋ณผ ์ ์๋ ๋ค์ด๋ฐ์ ํด์ฃผ์ธ์ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | ๋ฐ๋ณต๋๋ UI๋ก ๋ณด์
๋๋ค, ์์๋ฐ์ดํฐ + Array.map method ํ์ฉํด์ ํํํด๋ณด์ธ์ |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | - `id` ๋ณด๋ค๋ `className` ์ ํ์ฉํด์ฃผ์๊ธฐ ๋ฐ๋๋๋ค.
- HTML์์ `id` ๋ ๋ฌธ์ ๋ด์์ ์ ์ผํด์ผ ํฉ๋๋ค. ์ด๋ฌํ ์ด์ ๋ก ๋จ์ผ ์์๋ฅผ ๋ค๋ฃจ๋ ๊ฒฝ์ฐ `id`๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
- ํ์ง๋งย ์ ๋ง๋ก ํด๋น ์์์ ๋ํ ์ด๋ฒคํธ๋ ์คํ์ผ ํธ๋ค๋ง์ด ํ๋ก์ ํธ ์ ์ฒด์์ ๋จ ํ๋ฒ๋ง ์ฌ์ฉ ๋๋์งย ์ถฉ๋ถํ ๊ณ ๋ฏผํด์ผํฉ๋๋ค. ์ผ๋ฐ์ ์ผ๋ก ์ปดํฌ๋ํธ๋ ์ฌ์ฌ์ฉ ๋ ์ ์๊ธฐ ๋๋ฌธ์ ๊ฐ์ ์์๊ฐ ์ฌ๋ฌ๋ฒ ์์ฑ๋ ์ ์์ต๋๋ค. ์ด๋ฌํ ์ด์ ๋ก ๋ณดํต์ ๊ฒฝ์ฐ์๋ `className` ์ ์ฌ์ฉํฉ๋๋ค. |
@@ -0,0 +1,85 @@
+import React from 'react';
+import { withRouter } from 'react-router-dom';
+import InputBox from './InputBox/InputBox';
+import './JaehyunLogin.scss';
+
+class JaehyunLogin extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ userName: '',
+ password: ... | JavaScript | inline-style๋ณด๋ค className์ ๋์ ์ผ๋ก ๋ฐ๊พธ๋ ์์ผ๋ก ์คํ์ผ๋ง ํด์ฃผ์ธ์ |
@@ -0,0 +1,20 @@
+import React from 'react';
+
+class Content extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <li key={this.props.key} style={{ listStyle: 'none' }}>
+ <span style={{ fontWeight: 'bold', marginRight: '20px' }}>
+ {this.props.... | JavaScript | state๋ฅผ ๋ง๋ค์ง ์์ ๊ฒฝ์ฐ constructor ์ํด์ฃผ์
๋ ๋ฉ๋๋ค! |
@@ -0,0 +1,20 @@
+import React from 'react';
+
+class Content extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <li key={this.props.key} style={{ listStyle: 'none' }}>
+ <span style={{ fontWeight: 'bold', marginRight: '20px' }}>
+ {this.props.... | JavaScript | key props์ Array.map method๋ฅผ ํ์ฉํ์ฌ ์ฌ๋ฌ ์๋ฆฌ๋จผํธ๋ฅผ ์์ฑํ ๋ ๋ถ์ฌํด์ํ๋ ๊ฒ์ธ๋ฐ ์ฌ๊ธฐ์๋ map์ ์ฌ์ฉํ๊ณ ์์ง ์์ต๋๋ค. key prop ๋ถ์ฌํ๋ ์๋ฏธ๊ฐ ์์ด๋ณด์
๋๋ค,
๊ทธ๋ฆฌ๊ณ inline-style์ ์ง์ํด์ฃผ์๊ณ className์ ํตํ ์คํ์ผ๋ง ํด์ฃผ์ธ์, ๋๋จธ์ง ๋ถ๋ถ๋ ๋ง์ฐฌ๊ฐ์ง์
๋๋ค, |
@@ -0,0 +1,26 @@
+import React from 'react';
+
+class InputForm extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <form onSubmit={this.addContent}>
+ <input
+ name="comment"
+ className="replyInput"
+ type="text"
+ p... | JavaScript | currenState๋ผ๋ ํจ์๋ ๋ณด์ด์ง ์์ต๋๋ค! undefined๊ฐ ํ ๋น๋๊ณ ์์ ๊ฒ ๊ฐ๋ค์ |
@@ -0,0 +1,26 @@
+import React from 'react';
+
+class InputForm extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ return (
+ <form onSubmit={this.addContent}>
+ <input
+ name="comment"
+ className="replyInput"
+ type="text"
+ p... | JavaScript | addContent๋ ๋ง์ฐฌ๊ฐ์ง๋ก ์์ด๋ณด์
๋๋ค! |
@@ -0,0 +1,183 @@
+import React from 'react';
+import { withRouter } from 'react-router';
+import './JaehyunMain.scss';
+import Nav from '../../../components/Nav/Nav';
+import Content from './Content/Content';
+
+class JaehyunMain extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = ... | JavaScript | ```suggestion
this.setState({ newContent });
```
๊ฐ์ฒด ๋จ์ถ ์์ฑ๋ช
์ ์ด์ฉํ ์ ์์ต๋๋ค. |
@@ -0,0 +1,183 @@
+import React from 'react';
+import { withRouter } from 'react-router';
+import './JaehyunMain.scss';
+import Nav from '../../../components/Nav/Nav';
+import Content from './Content/Content';
+
+class JaehyunMain extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = ... | JavaScript | alt ์์ฑ์ด ์ต์๋จ์ ์์นํ๋๋ก ์์ ์กฐ์ ํด์ฃผ์ธ์ |
@@ -0,0 +1,183 @@
+import React from 'react';
+import { withRouter } from 'react-router';
+import './JaehyunMain.scss';
+import Nav from '../../../components/Nav/Nav';
+import Content from './Content/Content';
+
+class JaehyunMain extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = ... | JavaScript | className ์ฌ์ฉํด์ฃผ์ธ์ |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | ์ต์์ ๋ค์คํ
ํ๋ ์์์ ํด๋์ค๋ค์์ ์ปดํฌ๋ํธ ๋ช
๊ณผ ๋์ผํ๊ฒ ๋ถ์ฌํด์ฃผ์๊ณ , ํด๋์ค ๋ค์์ ์ด์ฉํด์ ์ต์์ ๋ค์คํ
์ ํด์ฃผ์๋๊ฒ ๋ค๋ฅธ ์ปดํฌ๋ํธ์ css ์ถฉ๋์ด ๋ฐ์ํ ํ๋ฅ ์ ๋ฎ์ถ ์ ์์ต๋๋ค. |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | section์ ์ด๋ฏธ display:block์ ์์ฑ์ด๊ธฐ๋๋ฌธ์, width:100%๋ฅผ ๋ถ์ฌํ ํ์๊ฐ ์์ต๋๋ค. |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | ๊ฐ๋ฅํ ํ๊ทธ ์
๋ ํฐ๋ณด๋ค ํด๋์ค๋ค์์ ๋ถ์ฌํด์ ์ ํํด์ฃผ์ธ์! ํ๊ทธ์
๋ ํฐ๋ฅผ ์ฌ์ฉํ ๊ฒฝ์ฐ ๋ค๋ฅธ ์์๋ค์ ์ํฅ์ ๋ฏธ์น ์ฌ์ง๊ฐ ์์ต๋๋ค! |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | ์ด๋ ๊ฒ ์์ฃผ ์ฌ์ฉํ๋ ์์ฑ๋ค์ mixin์ผ๋ก ๋ง๋ค์ด์ ์ฌ์ฉํด๋ ์ข๊ฒ ๋ค์ |
@@ -0,0 +1,280 @@
+.JaehyunMain {
+ .fixedTop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ background-color: white;
+ border-bottom: 2px solid #ebebeb;
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ padding: 15px;
+ max-width: 1100px;
+ width: 10... | Unknown | ์ฐ์ฑ๋ ๋ฆฌ๋ทฐ ๋๋ฌด ๊ฐ์ฌํฉ๋๋ค! |
@@ -0,0 +1,177 @@
+@import '../../../styles/variable.scss';
+
+@mixin flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+@mixin login-input {
+ width: 266px;
+ height: 36px;
+ border: $boxBorder;
+ background-color: #fafafa;
+ color: #a4a4a4;
+ border-radius: 2px;
+ margin-bottom:... | Unknown | - index.js์์ importํ๊ธฐ ๋๋ฌธ์ ์ฌ๊ธฐ์๋ ์ํ์
๋ ๋ฉ๋๋ค. |
@@ -0,0 +1,177 @@
+@import '../../../styles/variable.scss';
+
+@mixin flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+@mixin login-input {
+ width: 266px;
+ height: 36px;
+ border: $boxBorder;
+ background-color: #fafafa;
+ color: #a4a4a4;
+ border-radius: 2px;
+ margin-bottom:... | Unknown | - mixin ์ฌ์ฉํด์ฃผ์ ๊ฒ ์ข์ต๋๋ค.
- ๋ค๋ฅธ ๋ถ๋ค๊น์ง ์ฌ์ฉํ์ค ์ ์๋ ๋ถ๋ถ์ด๋ผ๊ณ ์๊ฐ๋์๋ฉด variables.scss๋ก ์ฎ๊ฒจ์ ์งํํด ์ฃผ์ธ์. |
@@ -0,0 +1,177 @@
+@import '../../../styles/variable.scss';
+
+@mixin flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+@mixin login-input {
+ width: 266px;
+ height: 36px;
+ border: $boxBorder;
+ background-color: #fafafa;
+ color: #a4a4a4;
+ border-radius: 2px;
+ margin-bottom:... | Unknown | - nesting ํด์ฃผ์ธ์.
- ๋ ํ๊ทธ๋ฅผ ์ด์ฉํ ์์ฑ ์ฃผ์๋ ๊ฒ์ ์งํฅํด ์ฃผ์๊ณ className์ ํ์ฉํด ์ฃผ์ธ์. |
@@ -1,7 +1,138 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { useNavigate, Link } from 'react-router-dom';
-function Login() {
- return <div>Gaeul Login</div>;
-}
+const Login = () => {
+ const [inputValues, setInputValues] = useState({
+ userId: '',
+ password: '',
+ });
... | JavaScript | - ๋ถํ์ํ ์ฃผ์์ ์ญ์ ํด ์ฃผ์ธ์. |
@@ -1,7 +1,138 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { useNavigate, Link } from 'react-router-dom';
-function Login() {
- return <div>Gaeul Login</div>;
-}
+const Login = () => {
+ const [inputValues, setInputValues] = useState({
+ userId: '',
+ password: '',
+ });
... | JavaScript | - ํ๊ทธ๋ฅผ ์ฌ์ฉํด ์ฃผ์๊ณ className์ ํด๋น ์ปดํฌ๋ํธ๋ก ํด์ฃผ์ธ์. |
@@ -1,7 +1,138 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { useNavigate, Link } from 'react-router-dom';
-function Login() {
- return <div>Gaeul Login</div>;
-}
+const Login = () => {
+ const [inputValues, setInputValues] = useState({
+ userId: '',
+ password: '',
+ });
... | JavaScript | - return ์์ชฝ์ render์ ๊ด๋ จ๋ ๋ถ๋ถ์ด๋ผ ๋ก์ง์ ์ต๋ํ ํจ์ ์์ญ์ ์์ฑํด ์ฃผ์ธ์. |
@@ -1,7 +1,138 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { useNavigate, Link } from 'react-router-dom';
-function Login() {
- return <div>Gaeul Login</div>;
-}
+const Login = () => {
+ const [inputValues, setInputValues] = useState({
+ userId: '',
+ password: '',
+ });
... | JavaScript | - navigate๋ ์กฐ๊ฑด์ด ์์ ๋ ์ฌ์ฉํ์๋ฉด ๋ฉ๋๋ค.
- ๊ทธ๊ฒ ์๋๋ผ๋ฉด ๋ง์ํ์ ๊ฒ ์ฒ๋ผ Link ์ปดํฌ๋ํธ๋ฅผ ํ์ฉํ์
๋ ๋ฉ๋๋ค. |
@@ -0,0 +1,100 @@
+@import '../../../styles/variable.scss';
+
+p {
+ font-family: 'Roboto';
+ letter-spacing: 0.2px;
+}
+
+.Main {
+ background-color: $backGroundColor;
+
+ .main {
+ display: flex;
+ justify-content: center;
+ padding-bottom: 100px;
+
+ .main-right {
+ width: 250px;
+ height: ... | Unknown | - body๋ ๋ค๋ฅธ ํ์ด์ง์๋ ์ํฅ์ ์ค ์ ์๊ฒ ๋ค์
- ํ์ํ ๋ถ๋ถ์ด๋ผ๋ฉด common.scss์์ ์งํ๋๊ฑฐ๋ ํ์๋ค๊ณผ ๋
ผ์ ํ ์งํํ์๋ฉด ๋ฉ๋๋ค. |
@@ -0,0 +1,100 @@
+@import '../../../styles/variable.scss';
+
+p {
+ font-family: 'Roboto';
+ letter-spacing: 0.2px;
+}
+
+.Main {
+ background-color: $backGroundColor;
+
+ .main {
+ display: flex;
+ justify-content: center;
+ padding-bottom: 100px;
+
+ .main-right {
+ width: 250px;
+ height: ... | Unknown | - ์ปดํฌ๋ํธ๋ฅผ ๋ถ๋ฆฌํ์
จ๋ค๋ฉด ํด๋น css๋ ๋ถ๋ฆฌํ์
์ ์งํํ์๋ ๊ฒ ๊ฐ๋
์ฑ์๋ ์ข๊ฒ ๋ค์. |
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+ const [input, setInput] = useState('');
+ const [inputList, setInputList] = useState([]);
+
+ const post = event => {
+ event.preventDefault();
+ setInputList(inputList.co... | JavaScript | - className์ ์ปดํฌ๋ํธ๋ช
๊ณผ ๊ฐ๊ฒ ํด์ฃผ์ธ์. |
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+ const [input, setInput] = useState('');
+ const [inputList, setInputList] = useState([]);
+
+ const post = event => {
+ event.preventDefault();
+ setInputList(inputList.co... | JavaScript | - alt๋ ์ ์ ๊ฐ ๋ณด๋ ํ
์คํธ ์
๋๋ค.
- ์ ์ ์
์ฅ์์ ์์ฑํด ์ฃผ์ธ์. |
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+ const [input, setInput] = useState('');
+ const [inputList, setInputList] = useState([]);
+
+ const post = event => {
+ event.preventDefault();
+ setInputList(inputList.co... | JavaScript | - onKeyup ๋ณด๋ค๋ ๋ณ์๋ก ๋์ ๊ด๋ฆฌ๋ฅผ ํ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
- ๋ณ์๋ฅผ ๋ง๋ค์ด ๋์ ์ผ๋ก ๊ด๋ฆฌํ๋ค๋ฉด state๊ฐ ์์ด๋ ๋๊ฒ ๋ค์. |
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+ const [input, setInput] = useState('');
+ const [inputList, setInputList] = useState([]);
+
+ const post = event => {
+ event.preventDefault();
+ setInputList(inputList.co... | JavaScript | - form ํ๊ทธ ์์ ์๋ค๋ฉด ๋ฒํผ์๋ ๋ฐ๋ก onClick์ ๋ถ์ฌํ์ง ์์ผ์
๋ ๋ฉ๋๋ค. |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ด๋ค TextField์ธ์ง ๋ช
์ ์ํด์ฃผ๊ณ editing์ด ์์๋ textField์๋ ์๋์ผ๋ก ์ ์ฉ๋๋๊ตฌ๋
์ค ์๊ฐ๋ชปํ๋๋ฐ ๋ฐฐ์ ์ต๋๋ค ใ
ใ
๊ฐ์ฌํด์ |
@@ -0,0 +1,205 @@
+//
+// LoginView.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/16.
+//
+
+import UIKit
+
+class LoginView: UIView {
+
+ // MARK: - Object Setting
+
+ private let mainLabel = UILabel().then {
+ $0.text = "TVING ID ๋ก๊ทธ์ธ"
+ $0.font = .tvingMedium(ofSize... | Swift | ๊ฐ๊ฐ ์ข์ฐ๋ฅผ ๊ธฐ์ค์ผ๋ก ํ๋ฉด ๊ธฐ๊ธฐ๋ง๋ค ์ฐจ์ด๊ฐ ์ข ๋ํ๋ ๊ฑฐ ๊ฐ์์!
๊ฐ์ด๋ฐ๋ฅผ ๊ธฐ์ค์ผ๋ก ๋ฌถ์ ์ ์๋ ๋ฐฉ๋ฒ(stackview)๋ ์ข์ ๊ฑฐ๊ฐ์์ ใ
ใ
|
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | UIView๋ฅผ ๋ฐ๋ก ๋นผ๋๊น ํ ์ฝ๋๊ฐ ์งง์์ก๋ค์
์ ๋ ๋ค์์ ์ด๋ฐ์์ผ๋ก ํด๋ด์ผ๊ฒ ์ต๋๋ค ๊ฐ์ฌํฉ๋๋ค ใ
ใ
|
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | targetํจ์ ๋ฐ๋ก ๋บ ๊ฑฐ ์งฑ์ด์์ฌ ๋ฐฐ์๊ฐ๋๋ค |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ฐ์ ํค๋ณด๋ ์ฒ๋ฆฌ๊น์ง !! ์งฑ์ด๊ตฐ์ฌ |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ ๊ตฌ์กฐ์ฒด๋ก ๋ฌถ์ด์ฃผ๋ ๊ฑฐ ๊น์ง! |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ๊ตฌ์กฐ์ฒด์์ ๋ณ์๋ค์ ""๋ก ์ด๊ธฐํํ๋ ๊ฒ๋ณด๋ค ์ต์
๋ ์ฒ๋ฆฌํด๋๋๊ฒ ์ด๋จ๊น์?
๋์ค์ ๊ตฌ์กฐ์ฒด ๋ณ์์ ๊ฐ์ ๋ฃ๋ค๋ณด๋ฉด, ๋ณ์๊ฐ ์ค์ ๋ก ๊ฐ์ด ์๋ ์ํ์ธ์ง ์๋๋ฉด ์๋์ ์ผ๋ก ๋น ๊ฐ์ผ๋ก ์ด๊ธฐํ๋ ๊ฒ์ธ์ง๋ฅผ
๊ตฌ๋ถํ๊ธฐ ์ด๋ ต๋ค๊ณ ์๊ฐํด์ ์ ๋ ?(์ต์
๋)์ ์ฌ์ฉํด๋ณด๋ฉด ์ข์๊ฒ ๊ฐ์์!
`var id: String?` ์ด๋ฐ ์์ผ๋ก์ |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ค์ํํธ์์ ์ ๊ทผ ์ ์ด์๋ฅผ ๋ฐ๋ก ์ ์ธํ์ง ์์ผ๋ฉด internal ์ ๊ทผ์ด ๊ธฐ๋ณธ์ด๋ผ๊ณ ํด์!
open-> public -> internal -> file-private -> private ์ผ๋ก ๊ฐ ์๋ก ์ ํ์ ์ธ ์ ๊ทผ์์ธ๋ฐ
์๋ก ๋ค๋ฅธ ๋ชจ๋๋ผ๋ฆฌ ์ ๊ทผํ๋ ์ํฉ์ด ์๋๋ผ๋ฉด
๊ตณ์ด public์ ์ ์ธํ์ฌ ์ ๊ทผ ์์ค์ ์ฝํ๊ฒ ํ ํ์ ์๋ค๊ณ ์๊ฐํ๋๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์ธ์ฉ?
https://zeddios.tistory.com/383 |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | public์ด ์๋ก ๋ค๋ฅธ ๋ชจ๋์์๋ ์ ๊ทผํ ์ ์๋๋กํ๋ ์ ๊ทผ ์ ์ด๋ผ๊ณ ํ๋ค์.
๋ชจ๋์ด ์์ํด์ ์ฐพ์๋ณด๋ "Xcode์ ๊ฐ ๋น๋ ๋์"์ ๋ชจ๋์ด๋ผ๊ณ ํ๋๋ผ๊ณ ์. ํ๋ก์ ํธ ํ์ผ์ด๋ผ๊ณ ์ ๋ ์ดํดํ์ด์! |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ?? ๋ฐฉ์์ผ๋ก ์ต์
๋ ์ธ๋ฉํํ๋๊ฒ๋ ์ข์ง๋ง!
๊ฐ๋
์ฑ์ ์ํด if let ์ด๋ guard let์ ์ฐ๋ฉด ๋ ์ข์๊ฒ ๊ฐ์์~ |
@@ -0,0 +1,205 @@
+//
+// LoginView.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/16.
+//
+
+import UIKit
+
+class LoginView: UIView {
+
+ // MARK: - Object Setting
+
+ private let mainLabel = UILabel().then {
+ $0.text = "TVING ID ๋ก๊ทธ์ธ"
+ $0.font = .tvingMedium(ofSize... | Swift | ๋ฒํผ ์ปดํฌ๋ํธ๋ค์๋ง lazy๋ฅผ ๋ฃ์ด์ฃผ์
จ๋๋ฐ addTarget์์ (๋
ธ๋์)์๋์ ํผํ๊ธฐ ์ํด์ ๋ฃ์๊ฑฐ์ฃ ..?
๋ฒํผ ์ด๋ฒคํธ ์ฐ๊ฒฐ ๋ฐฉ์์ค์ addTarget ๋ฐฉ์ ์ธ์๋ addAction ๋ฐฉ์๋ ์์ด์!
addAction ๋ฐฉ์์ ์ฌ์ฉํ๋ฉด ๋ฒํผ ์ด๋ฒคํธ ์ฐ๊ฒฐ ํจ์์ @objc๋ ๋ถ์ด์ง ์์๋ ๋๊ณ , ์๋์ ํผํ๊ธฐ ์ํ lazy๋ ์์จ๋ ๋ฉ๋๋ค!
๊ฐ๋
์ฑ ์ธก๋ฉด์ด๋, ์ต๋ํ objc ์์๋ฅผ ์ ์ธํ๊ณ UIKit ํต์ผ์ฑ์ ์ํด addAction ๋ฐฉ์๋ ์๊ณ ์์ผ๋ฉด ์ข์๊ฒ ๊ฐ์์!
์๋๋ addAction ๋ฐฉ์์ผ๋ก ๋ฒํผ ์ด๋ฒคํธ ์ฐ๊ฒฐํ ์์ ์ฝ๋์์!
priva... |
@@ -0,0 +1,205 @@
+//
+// LoginView.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/16.
+//
+
+import UIKit
+
+class LoginView: UIView {
+
+ // MARK: - Object Setting
+
+ private let mainLabel = UILabel().then {
+ $0.text = "TVING ID ๋ก๊ทธ์ธ"
+ $0.font = .tvingMedium(ofSize... | Swift | ์ด๊ฑด ์ ๊ฐ ์์ฃผ ์ฌ์ฉํ๋ ๋ฐฉ์์ธ๋ฐ
addSubviews ํ ๋ ๊ฐ๋ก๋ก ๊ธธ๊ฒ ์ฐ๋๊ฒ ๋ณด๋ค ์๋ ์ฝ๋์ฒ๋ผ ์ธ๋ก๋ก ๋๋ฆฌ๋๊ฒ ๊ฐ๋
์ฑ์ ์ข๋๋ผ๊ณ ์.
๋ฌผ๋ก ์ฝ๋ ์ค์ ๋์ด๋์ง๋ง์! ๊ฐ์ ์ ํธํ๋ ์คํ์ผ์ด ์๋๊ฒ ๊ฐ์๋ฐ ์กฐ์ฌ์ค๋ .. ์ ์ํด๋ด
๋๋ค ใ
ใ
view.addSubviews(toolBarView,
titleLabelStackView,
houseImageView,
homeGroupLabel,
... |
@@ -0,0 +1,45 @@
+//
+// WelcomeViewController.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/12.
+//
+
+import UIKit
+
+final class WelcomeViewController: BaseViewController {
+
+ // MARK: - Property
+
+ private let mainView = WelcomeView()
+
+ // MARK: - Target
+
+ priva... | Swift | ์ ๊ฐ ์ต๊ทผ์ ์๊ฐ ์์ด ๋ฒํผ ์ด๋ฒคํธ ์ฐ๊ฒฐ ํจ์ ํธ์ถ์ viewWillAppear ์ชฝ์์ ํ๋ค๊ฐ... ๋ฌธ์ ๊ฐ ์๊ฒผ๋๋ฐ
viewDidLoad์ ๋๋ฌด ์ ํด๋์
จ๋ค์ ^~^ |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ๋ ์ด์ ์์๋์ง ์๋ ํด๋์ค๋ผ๋ฉด final ํค์๋ ๋ถ์ด๋ฉด ์ข์๊ฒ ๊ฐ์์! |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ฌ๊ธฐ์ didSet์ ์ฌ์ฉํด์ ์ฝ๋๋ฅผ ์์ฑํ๋ฉด ์ข์๊ฑฐ ๊ฐ์์ฉ ์๋ ๋์ถฉ ์์๋ฅผ ์ ์๋๋ฐ ์ ์์ ๋ didSet์ ์ ํ์ฉํ์ง ๋ชปํด์
@meltsplit @seungchan2 ํ์ธ ๋ถํ๋๋ฆฝ๋๋ค
```Swift
public var nickName: String = โ" {
didSet {
guard let nickName = nickNameBottomSheet.nickNameTextFeild.text else { return }
self.nickName = nickName
}
... |
@@ -0,0 +1,261 @@
+//
+// LoginViewController_TVING.swift
+// GO_SOPT_Seminar_Assingment
+//
+// Created by ๊น๋ค์ on 2023/04/11.
+//
+
+import UIKit
+
+import SnapKit
+import Then
+
+struct TvingUserInfo {
+ var id: String?
+ var password: String?
+ var nickName: String?
+}
+
+final class LoginViewController_... | Swift | ์ต์
๋ ์ฒ๋ฆฌ์ ๋ํด ๊ณต๋ถํ๋๊ฑด ๋ถ๋ช
๋์ค์ ์ข์ ์์ฐ์ด ๋ ๊ฑฐ์์ฌ! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.