From d3ebcd3d67aad9cf23bfc995a45eed206bd6656b Mon Sep 17 00:00:00 2001 From: woohee Date: Wed, 13 Nov 2024 20:44:11 +0900 Subject: [PATCH 01/70] =?UTF-8?q?[WRFE-11](fix):=20conflict=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/shared/ui/header/core/Header.tsx | 77 +++++++++++++++++++ pnpm-lock.yaml | 60 +++++++++++++-- 2 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 apps/front/wraffle-webview/src/shared/ui/header/core/Header.tsx diff --git a/apps/front/wraffle-webview/src/shared/ui/header/core/Header.tsx b/apps/front/wraffle-webview/src/shared/ui/header/core/Header.tsx new file mode 100644 index 00000000..02358105 --- /dev/null +++ b/apps/front/wraffle-webview/src/shared/ui/header/core/Header.tsx @@ -0,0 +1,77 @@ +import Image from 'next/image'; +import {type ReactNode} from 'react'; +import {Icon} from '@wraffle/ui/src/ui/icon/Icon'; +import {Typography} from '@wraffle/ui/src/ui/typography/Typography'; + +interface HeaderProps { + withBackButton?: boolean; + children: ReactNode; +} + +const HeaderPrimitive = ({children}: HeaderProps) => { + return ( +
+ {children} +
+ ); +}; + +type WithChildren = { + children: ReactNode; +}; + +const Left = ({children}: WithChildren) => { + return
{children}
; +}; + +const Middle = ({children}: WithChildren) => { + return
{children}
; +}; + +const Right = ({children}: WithChildren) => { + return
{children}
; +}; + +interface BackButtonProps { + onClick: () => void; +} + +const BackButton = ({onClick}: BackButtonProps) => { + return ( + + ); +}; + +const Logo = () => { + return ( +
+ logo +
+ ); +}; + +interface TitleProps { + children: string; +} + +const Title = ({children}: TitleProps) => { + return ( + + {children} + + ); +}; + +HeaderPrimitive.Left = Left; +HeaderPrimitive.Middle = Middle; +HeaderPrimitive.Right = Right; +HeaderPrimitive.BackButton = BackButton; +HeaderPrimitive.Logo = Logo; +HeaderPrimitive.Title = Title; + +export {HeaderPrimitive as Header}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21e67de6..a29b0d36 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1589,9 +1589,6 @@ packages: '@expo/config-plugins@8.0.10': resolution: {integrity: sha512-KG1fnSKRmsudPU9BWkl59PyE0byrE2HTnqbOrgwr2FAhqh7tfr9nRs6A9oLS/ntpGzmFxccTEcsV0L4apsuxxg==} - '@expo/config-plugins@8.0.8': - resolution: {integrity: sha512-Fvu6IO13EUw0R9WeqxUO37FkM62YJBNcZb9DyJAOgMz7Ez/vaKQGEjKt9cwT+Q6uirtCATMgaq6VWAW7YW8xXw==} - '@expo/config-plugins@8.0.9': resolution: {integrity: sha512-dNCG45C7BbDPV9MdWvCbsFtJtVn4w/TJbb5b7Yr6FA8HYIlaaVM0wqUMzTPmGj54iYXw8X/Vge8uCPxg7RWgeA==} @@ -3639,6 +3636,9 @@ packages: ajv@8.11.0: resolution: {integrity: sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==} + ajv@8.11.0: + resolution: {integrity: sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==} + ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} @@ -4867,6 +4867,11 @@ packages: peerDependencies: expo: '*' + expo-build-properties@0.12.5: + resolution: {integrity: sha512-donC1le0PYfLKCPKRMGQoixuWuwDWCngzXSoQXUPsgHTDHQUKr8aw+lcWkTwZcItgNovcnk784I0dyfYDcxybA==} + peerDependencies: + expo: '*' + expo-constants@16.0.2: resolution: {integrity: sha512-9tNY3OVO0jfiMzl7ngb6IOyR5VFzNoN5OOazUWoeGfmMqVB5kltTemRvKraK9JRbBKIw+SOYLEmF0sEqgFZ6OQ==} peerDependencies: @@ -4892,6 +4897,26 @@ packages: peerDependencies: expo: '*' + expo-dev-client@4.0.28: + resolution: {integrity: sha512-wz5G4vY3Gbk5GuQTyijdqY4Hwr/NDt5OUTErbOu1vd4XRIAsI+8IkK5hsBUhGmqrdkYnP5NxxOxC/soFzX/9+w==} + peerDependencies: + expo: '*' + + expo-dev-launcher@4.0.28: + resolution: {integrity: sha512-goE7jcaGVA2zu4gV3/hQ9RXqGhUZZAu339VYNLbwPdaNCzFaG6A8MZHg18gytCUnZ5QkRJsYi4q/8YcwUCASlQ==} + peerDependencies: + expo: '*' + + expo-dev-menu-interface@1.8.3: + resolution: {integrity: sha512-QM0LRozeFT5Ek0N7XpV93M+HMdEKRLEOXn0aW5M3uoUlnqC1+PLtF3HMy3k3hMKTTE/kJ1y1Z7akH07T0lunCQ==} + peerDependencies: + expo: '*' + + expo-dev-menu@5.0.22: + resolution: {integrity: sha512-VzpdQReAtjbI1qIuwOf0sUzf91HsfGThojgJD9Ez0eca12qY5tTGYzHa1EM9V+zIcNuNZ7+A8bHJJdmZ4zvU6g==} + peerDependencies: + expo: '*' + expo-file-system@17.0.1: resolution: {integrity: sha512-dYpnZJqTGj6HCYJyXAgpFkQWsiCH3HY1ek2cFZVHFoEc5tLz9gmdEgTF6nFHurvmvfmXqxi7a5CXyVm0aFYJBw==} peerDependencies: @@ -4905,6 +4930,9 @@ packages: expo-json-utils@0.13.1: resolution: {integrity: sha512-mlfaSArGVb+oJmUcR22jEONlgPp0wj4iNIHfQ2je9Q8WTOqMc0Ws9tUciz3JdJnhffdHqo/k8fpvf0IRmN5HPA==} + expo-json-utils@0.13.1: + resolution: {integrity: sha512-mlfaSArGVb+oJmUcR22jEONlgPp0wj4iNIHfQ2je9Q8WTOqMc0Ws9tUciz3JdJnhffdHqo/k8fpvf0IRmN5HPA==} + expo-keep-awake@13.0.2: resolution: {integrity: sha512-kKiwkVg/bY0AJ5q1Pxnm/GvpeB6hbNJhcFsoOWDh2NlpibhCLaHL826KHUM+WsnJRbVRxJ+K9vbPRHEMvFpVyw==} peerDependencies: @@ -4918,6 +4946,11 @@ packages: peerDependencies: expo: '*' + expo-manifests@0.14.3: + resolution: {integrity: sha512-L3b5/qocBPiQjbW0cpOHfnqdKZbTJS7sA3mgeDJT+mWga/xYsdpma1EfNmsuvrOzjLGjStr1k1fceM9Bl49aqQ==} + peerDependencies: + expo: '*' + expo-modules-autolinking@1.11.2: resolution: {integrity: sha512-fdcaNO8ucHA3yLNY52ZUENBcAG7KEx8QyMmnVNavO1JVBGRMZG8JyVcbrhYQDtVtpxkbai5YzwvLutINvbDZDQ==} hasBin: true @@ -4968,6 +5001,11 @@ packages: peerDependencies: expo: '*' + expo-updates-interface@0.16.2: + resolution: {integrity: sha512-929XBU70q5ELxkKADj1xL0UIm3HvhYhNAOZv5DSk7rrKvLo7QDdPyl+JVnwZm9LrkNbH4wuE2rLoKu1KMgZ+9A==} + peerDependencies: + expo: '*' + expo-web-browser@13.0.3: resolution: {integrity: sha512-HXb7y82ApVJtqk8tManyudtTrCtx8xcUnVzmJECeHCB0SsWSQ+penVLZxJkcyATWoJOsFMnfVSVdrTcpKKGszQ==} peerDependencies: @@ -9721,6 +9759,8 @@ snapshots: '@expo/code-signing-certificates': 0.0.5 '@expo/config': 9.0.4 '@expo/config-plugins': 8.0.10 + '@expo/config': 9.0.4 + '@expo/config-plugins': 8.0.10 '@expo/devcert': 1.1.2 '@expo/env': 0.3.0 '@expo/image-utils': 0.5.1 @@ -9890,6 +9930,7 @@ snapshots: dependencies: '@babel/code-frame': 7.10.4 '@expo/config-plugins': 8.0.10 + '@expo/config-plugins': 8.0.10 '@expo/config-types': 51.0.3 '@expo/json-file': 8.3.3 getenv: 1.0.0 @@ -10024,8 +10065,8 @@ snapshots: '@expo/prebuild-config@7.0.8(expo-modules-autolinking@1.11.2)': dependencies: - '@expo/config': 9.0.3 - '@expo/config-plugins': 8.0.8 + '@expo/config': 9.0.4 + '@expo/config-plugins': 8.0.10 '@expo/config-types': 51.0.2 '@expo/image-utils': 0.5.1 '@expo/json-file': 8.3.3 @@ -10042,6 +10083,8 @@ snapshots: '@expo/prebuild-config@7.0.9(expo-modules-autolinking@1.11.2)': dependencies: + '@expo/config': 9.0.4 + '@expo/config-plugins': 8.0.10 '@expo/config': 9.0.4 '@expo/config-plugins': 8.0.10 '@expo/config-types': 51.0.3 @@ -12789,6 +12832,13 @@ snapshots: require-from-string: 2.0.2 uri-js: 4.4.1 + ajv@8.11.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 From b3adb2d99f1b2ab1437c9a8afc6bb1dbc18f22c4 Mon Sep 17 00:00:00 2001 From: woohee Date: Wed, 13 Nov 2024 21:41:20 +0900 Subject: [PATCH 02/70] =?UTF-8?q?[WRDE-11](feat):=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EB=B0=8F=20=EA=B2=B0=EA=B3=BC=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=ED=8D=BC=EB=B8=94=EB=A6=AC=EC=8B=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../front/wraffle-webview/app/search/page.tsx | 104 ++++++++++++++++++ .../app/search/results/page.tsx | 93 ++++++++++++++++ .../ui/bottomNavigation/BottomNavigation.tsx | 6 +- 3 files changed, 201 insertions(+), 2 deletions(-) create mode 100644 apps/front/wraffle-webview/app/search/page.tsx create mode 100644 apps/front/wraffle-webview/app/search/results/page.tsx diff --git a/apps/front/wraffle-webview/app/search/page.tsx b/apps/front/wraffle-webview/app/search/page.tsx new file mode 100644 index 00000000..12745ea5 --- /dev/null +++ b/apps/front/wraffle-webview/app/search/page.tsx @@ -0,0 +1,104 @@ +'use client'; + +import {useRouter} from 'next/navigation'; +import {useState} from 'react'; +import {Header} from '@/shared/ui'; +import {BottomNavigation, Typography, Icon} from '@wraffle/ui'; + +const SearchPage = () => { + const router = useRouter(); + const [keywords, setKeywords] = useState([ + '당일 마감', + 'Vans', + '티셔츠', + 'Stussy', + 'Carhartt', + '행사', + ]); + const [isFocused, setIsFocused] = useState(false); + + return ( +
+
+
+ +
+ +
+
+ +
+ +
+
+
+
+ +
+
+ setIsFocused(true)} + onBlur={() => setIsFocused(false)} + /> + +
+ +
+
+ + 추천 검색어 + + {keywords.length > 0 ? ( +
+ {keywords.map((keyword, index) => ( +
+ # {keyword} +
+ ))} +
+ ) : ( + + 아직 추천 검색어가 없어요. + + )} +
+ +
+
+ + 가장 많이 검색하고 있어요! + +
    + {['당일 마감', 'Vans', 'A/S', '아무거나', '행사'].map( + (item, index) => ( +
  • + + {index + 1} + {' '} + + {item} + {' '} +
  • + ), + )} +
+
+
+
+ +
+ ); +}; + +export default SearchPage; diff --git a/apps/front/wraffle-webview/app/search/results/page.tsx b/apps/front/wraffle-webview/app/search/results/page.tsx new file mode 100644 index 00000000..ab11c75a --- /dev/null +++ b/apps/front/wraffle-webview/app/search/results/page.tsx @@ -0,0 +1,93 @@ +'use client'; + +import {useRouter} from 'next/navigation'; +import {Header} from '@/shared/ui'; +import {Typography} from '@wraffle/ui'; +import {RaffleCard} from '@wraffle/ui'; +import {Icon} from '@wraffle/ui'; + +const SearchResultsPage = () => { + const router = useRouter(); + + return ( +
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ + '당일 마감' + + + 검색 결과 + +
+ +
+ + + +
+
+ ); +}; + +export default SearchResultsPage; diff --git a/packages/ui/src/ui/bottomNavigation/BottomNavigation.tsx b/packages/ui/src/ui/bottomNavigation/BottomNavigation.tsx index c5fb9f4c..d9aef547 100644 --- a/packages/ui/src/ui/bottomNavigation/BottomNavigation.tsx +++ b/packages/ui/src/ui/bottomNavigation/BottomNavigation.tsx @@ -18,7 +18,7 @@ const menuItems: ItemType[] = [ {name: 'user-circle', label: '내정보'}, ]; -export default function BottomNavigation() { +const BottomNavigation = () => { const [selectedIcon, setSelectedIcon] = useState('홈'); const handleClickIcon = (label: string) => { @@ -44,4 +44,6 @@ export default function BottomNavigation() { ); -} +}; + +export {BottomNavigation}; From 2f40b411776e8abe202f1e1ce709422289f832c4 Mon Sep 17 00:00:00 2001 From: woohee Date: Wed, 30 Oct 2024 19:57:38 +0900 Subject: [PATCH 03/70] =?UTF-8?q?[WRDS-45](feat):=20Typo=20=EC=8A=A4?= =?UTF-8?q?=ED=86=A0=EB=A6=AC=EB=B6=81=20=EB=B3=80=EA=B2=BD=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EB=A7=9E=EC=B6=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/typography/Typography.stories.tsx | 152 ++++-------------- 1 file changed, 27 insertions(+), 125 deletions(-) diff --git a/packages/ui/src/ui/typography/Typography.stories.tsx b/packages/ui/src/ui/typography/Typography.stories.tsx index 5b330ffd..e21fa1c4 100644 --- a/packages/ui/src/ui/typography/Typography.stories.tsx +++ b/packages/ui/src/ui/typography/Typography.stories.tsx @@ -1,4 +1,5 @@ import {Typography, TypographyProps} from './Typography'; +import {colorStyles} from './prop/color.prop'; import type {Meta, StoryFn} from '@storybook/react'; const meta: Meta = { @@ -51,33 +52,14 @@ const meta: Meta = { ], }, }, - weight: { - description: '텍스트 굵기', - table: { - type: {summary: 'regular | medium | semibold | bold'}, - }, - control: { - type: 'select', - options: ['regular', 'medium', 'semibold', 'bold'], - }, - }, - lineHeight: { - description: '텍스트 라인 높이', - table: { - type: {summary: 'string'}, - }, - control: { - type: 'text', - }, - }, - textColor: { + color: { description: '텍스트 색상', table: { type: {summary: 'enum'}, }, control: { type: 'select', - options: colorList, + options: Object.keys(colorStyles), }, }, children: { @@ -85,14 +67,6 @@ const meta: Meta = { type: 'text', }, }, - asChild: { - table: { - disable: true, - }, - control: { - disable: true, - }, - }, }, }; @@ -104,59 +78,23 @@ export const Heading = Template.bind({}); Heading.args = { children: ( <> - - Heading 1 (32px, Bold, 140%) + + Heading 1 (32px, Bold) - - Heading 2 (24px, Bold, 140%) + + Heading 2 (24px, Bold) - - Heading 3 (20px, Semi Bold, 140%) + + Heading 3 (20px, Semi Bold) - - Heading 4 (17px, Semi Bold, 140%) + + Heading 4 (17px, Semi Bold) - - Heading 5 (16px, Semi Bold, 140%) + + Heading 5 (16px, Semi Bold) - - Heading 6 (15px, Semi Bold, 140%) + + Heading 6 (15px, Semi Bold) ), @@ -166,41 +104,17 @@ export const Paragraph = Template.bind({}); Paragraph.args = { children: ( <> - - Paragraph 1 (16px, Medium, 140%) + + Paragraph 1 (16px) - - Paragraph 2 (14px, Medium, 140%) + + Paragraph 2 (14px) - - Paragraph 3 (14px, Medium, 140%) + + Paragraph 3 (14px) - - Paragraph 4 (13px, Medium, 140%) + + Paragraph 4 (13px) ), @@ -210,23 +124,11 @@ export const SmallText = Template.bind({}); SmallText.args = { children: ( <> - - Small Text 1 (12px, Medium, 140%) + + Small Text 1 (12px) - - Small Text 2 (10px, Medium, 140%) + + Small Text 2 (10px) ), From a763b90ad43be697b1bd8bdb3705ea63fee4f650 Mon Sep 17 00:00:00 2001 From: woohee Date: Wed, 30 Oct 2024 19:58:01 +0900 Subject: [PATCH 04/70] =?UTF-8?q?[WRDS-45](feat):=20=EB=8B=A4=EB=A5=B8=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=B0=8F=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20Typo=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/app/login/email/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/front/wraffle-webview/app/login/email/page.tsx b/apps/front/wraffle-webview/app/login/email/page.tsx index eef0679f..87f65064 100644 --- a/apps/front/wraffle-webview/app/login/email/page.tsx +++ b/apps/front/wraffle-webview/app/login/email/page.tsx @@ -40,7 +40,7 @@ const EmailLogin = () => {
- + 비밀번호 찾기 From 5a959675fff72d5c85bba65785b639b94152fdb3 Mon Sep 17 00:00:00 2001 From: woohee Date: Wed, 6 Nov 2024 21:56:42 +0900 Subject: [PATCH 05/70] =?UTF-8?q?[WRDS-45](docs):=20mdx=20docs=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/src/ui/typography/Typography.mdx | 186 +------------------ 1 file changed, 9 insertions(+), 177 deletions(-) diff --git a/packages/ui/src/ui/typography/Typography.mdx b/packages/ui/src/ui/typography/Typography.mdx index 7a5d499d..827934d1 100644 --- a/packages/ui/src/ui/typography/Typography.mdx +++ b/packages/ui/src/ui/typography/Typography.mdx @@ -13,8 +13,6 @@ import {Meta, Story, Controls, Canvas, Primary} from '@storybook/blocks'; - [Props](#props) - [Description](#description) - [Font Size](#font-size) -- [Font Weight](#font-weight) -- [Line Height](#line-height) - [Colors](#colors) - [Usage](#usage) @@ -31,12 +29,13 @@ import {Meta, Story, Controls, Canvas, Primary} from '@storybook/blocks'; `Typography`는 아래와 같이 사용하시면 됩니다: - `'as'` prop은 의미론적이며 시각적 변형은 되지 않습니다. -- 지정된 타입 외에 세부적인 조정이 필요하다면 `className` 속성을 사용하여 Tailwind CSS 스타일을 적용하세요. +- `size='h1'` 처럼 사용할 시 디자인 시스템 설계 시 지정된 fontWeight, lineHeight가 같이 적용되는걸 유의해주세요. +- 디자인 시스템 설계 시 지정한 타입 외에 세부적인 조정이 필요하다면 `className` 속성을 사용하여 Tailwind CSS 스타일을 적용하세요. 따라서, 각 스타일이 적용되는 태그를 유념하여 사용해 주세요. ```tsx - + Raffle ``` @@ -171,176 +170,9 @@ import {Meta, Story, Controls, Canvas, Primary} from '@storybook/blocks'; Raffle ``` -## Font Weight - -
- {[ - { - label: 'regular', - weight: 400, - text: 'Raffle', - }, - { - label: 'medium', - weight: 500, - text: 'Raffle', - }, - { - label: 'semibold', - weight: 600, - text: 'Raffle', - }, - { - label: 'bold', - weight: 700, - text: 'Raffle', - }, - ].map(({label, weight, text}) => ( -
-
- {label} -
-
- {weight} -
-
- {text} -
-
- ))} -
-```tsx -Raffle -``` - -## Line Height - -
- {[ - { - label: '1.4', - value: '1.4', - text: 'Raffle', - }, - ].map(({label, value, text}) => ( -
-
- {label} -
-
- {value} -
-
- {text} -
-
- ))} -
-```tsx -Raffle -``` - ## Colors -- 일부 색상만 문서화되어있기에 자세한 색상 정보는 `typography.ts 혹은 tailwind.config.ts`를 참고하시길 바랍니다. + +- 일부 색상만 문서화되어있기에 자세한 색상 정보는 `color.prop.ts 혹은 tailwind.config.ts`를 참고하시길 바랍니다.
( + ].map(({color, label, code, description}, index) => (
-
+
{label}
```tsx -Raffle +Raffle ``` ## Usage From 8a6aae17ad8823cb3c36d4db6b5279dff799d2b7 Mon Sep 17 00:00:00 2001 From: woohee Date: Wed, 6 Nov 2024 22:35:39 +0900 Subject: [PATCH 06/70] =?UTF-8?q?[WRDS-45](feat):=20=EB=8B=A4=EB=A5=B8=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20typo=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/app/password/find/page.tsx | 6 +++--- apps/front/wraffle-webview/app/password/reset/page.tsx | 2 +- apps/front/wraffle-webview/app/password/sent/page.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/front/wraffle-webview/app/password/find/page.tsx b/apps/front/wraffle-webview/app/password/find/page.tsx index 2be4d40a..cd5353d9 100644 --- a/apps/front/wraffle-webview/app/password/find/page.tsx +++ b/apps/front/wraffle-webview/app/password/find/page.tsx @@ -54,7 +54,7 @@ const FindPasswordPage = () => {
- + 비밀번호 설정을 위해
가입한 이메일을 입력해주세요.
@@ -66,7 +66,7 @@ const FindPasswordPage = () => { placeholder='you@example.com' /> - + *이메일이 수신되지 않거나, 이메일주소가 기억나지 않을 경우 고객센터로 문의주시기 바랍니다. @@ -77,7 +77,7 @@ const FindPasswordPage = () => { className='flex flex-col items-center py-2' onClick={handleContactCustomerCenter} > - + 고객센터 문의
diff --git a/apps/front/wraffle-webview/app/password/reset/page.tsx b/apps/front/wraffle-webview/app/password/reset/page.tsx index 3b27c32b..c51f6d58 100644 --- a/apps/front/wraffle-webview/app/password/reset/page.tsx +++ b/apps/front/wraffle-webview/app/password/reset/page.tsx @@ -69,7 +69,7 @@ const ResetPasswordPage = () => {
- + 새로운 비밀번호 입력 diff --git a/apps/front/wraffle-webview/app/password/sent/page.tsx b/apps/front/wraffle-webview/app/password/sent/page.tsx index ca56ca77..0a7e2e8a 100644 --- a/apps/front/wraffle-webview/app/password/sent/page.tsx +++ b/apps/front/wraffle-webview/app/password/sent/page.tsx @@ -24,12 +24,12 @@ const SendEmailSuccessPage = () => {
- + 비밀번호 재설정
이메일을 보냈습니다.
- + 받은편지함을 확인해 주세요. 이메일이 오지 않으면, 스팸 메일함을 확인해 주시거나 아래 버튼을 눌러 이메일을 다시 보내주세요. From 55f11d6365863843f2f2a9c45690985874c42341 Mon Sep 17 00:00:00 2001 From: woohee Date: Wed, 6 Nov 2024 22:49:47 +0900 Subject: [PATCH 07/70] =?UTF-8?q?[WRDS-45](feat):=20Typography=20as=20?= =?UTF-8?q?=ED=83=9C=EA=B7=B8=20default=20=EA=B0=92=EC=9D=84=20p=20?= =?UTF-8?q?=ED=83=9C=EA=B7=B8=EB=A1=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/src/ui/typography/Typography.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/ui/typography/Typography.tsx b/packages/ui/src/ui/typography/Typography.tsx index 8446ef4d..15743e78 100644 --- a/packages/ui/src/ui/typography/Typography.tsx +++ b/packages/ui/src/ui/typography/Typography.tsx @@ -19,7 +19,7 @@ interface TypographyProps extends React.HTMLAttributes { export const Typography = React.forwardRef( ( { - as: Tag = 'span', + as: Tag = 'p', size = 'p1', color = 'zinc900', asChild = false, From d4857b609a4f7d7337b7e9699924389328450302 Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Tue, 15 Oct 2024 21:55:02 +0900 Subject: [PATCH 08/70] =?UTF-8?q?[WRFE-18](feat):=20=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EA=B0=80=EC=9E=85=20Funnel=20=EC=84=B8=ED=8C=85,=20GenericForm?= =?UTF-8?q?=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/app/join/page.tsx | 6 ++---- apps/front/wraffle-webview/app/login/email/page.tsx | 3 ++- pnpm-lock.yaml | 10 ++++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/front/wraffle-webview/app/join/page.tsx b/apps/front/wraffle-webview/app/join/page.tsx index 686a1516..bbef24ee 100644 --- a/apps/front/wraffle-webview/app/join/page.tsx +++ b/apps/front/wraffle-webview/app/join/page.tsx @@ -28,10 +28,8 @@ const Join = () => { return (
-
- - funnel.history.back()} /> - +
+ funnel.history.back()} />
diff --git a/apps/front/wraffle-webview/app/login/email/page.tsx b/apps/front/wraffle-webview/app/login/email/page.tsx index 87f65064..69172654 100644 --- a/apps/front/wraffle-webview/app/login/email/page.tsx +++ b/apps/front/wraffle-webview/app/login/email/page.tsx @@ -4,6 +4,7 @@ import type {z} from 'zod'; import Image from 'next/image'; import Link from 'next/link'; import {useRouter} from 'next/navigation'; +import type {LoginPayload} from '@/entities/auth'; import {loginDefaultValues, loginSchema} from '@/entities/auth'; import {Header} from '@/shared/ui'; import GenericForm from '@/shared/ui/form/GenericForm'; @@ -27,7 +28,7 @@ const EmailLogin = () => {
logo
- onSubmit={onSubmit} formOptions={{ mode: 'onChange', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21e67de6..41604b5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3518,6 +3518,16 @@ packages: peerDependencies: react: '>=16.8' + '@use-funnel/browser@0.0.7': + resolution: {integrity: sha512-f9MAUIglaO9b+0kMyZVaiKwPiNJLruc5GDRt2vfs6ExPb678dfpQSyPKbU8nik71hgO7GSjVwORbyx2AthWHzg==} + peerDependencies: + react: '>=16.8' + + '@use-funnel/core@0.0.7': + resolution: {integrity: sha512-aInoq3dv5MSuYIPb1w1Y1pTJEAncQghoX99suMwsqnkMGunnCOw6UAPo131oyM4H52m2rbsoBnHBreDEDYmvzg==} + peerDependencies: + react: '>=16.8' + '@vercel/style-guide@5.2.0': resolution: {integrity: sha512-fNSKEaZvSkiBoF6XEefs8CcgAV9K9e+MbcsDZjUsktHycKdA0jvjAzQi1W/FzLS+Nr5zZ6oejCwq/97dHUKe0g==} engines: {node: '>=16'} From 43ff6b41395faced4f4dfed78d1fa73f13c45a15 Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Wed, 30 Oct 2024 18:02:48 +0900 Subject: [PATCH 09/70] =?UTF-8?q?[WRFE-18](fix):=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20Typography=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wraffle-webview/app/login/email/page.tsx | 3 +- apps/front/wraffle-webview/app/login/page.tsx | 6 +- .../src/widgets/login/EmailForm.tsx | 6 +- pnpm-lock.yaml | 58 +++++++++++++++++++ 4 files changed, 67 insertions(+), 6 deletions(-) diff --git a/apps/front/wraffle-webview/app/login/email/page.tsx b/apps/front/wraffle-webview/app/login/email/page.tsx index 69172654..87f65064 100644 --- a/apps/front/wraffle-webview/app/login/email/page.tsx +++ b/apps/front/wraffle-webview/app/login/email/page.tsx @@ -4,7 +4,6 @@ import type {z} from 'zod'; import Image from 'next/image'; import Link from 'next/link'; import {useRouter} from 'next/navigation'; -import type {LoginPayload} from '@/entities/auth'; import {loginDefaultValues, loginSchema} from '@/entities/auth'; import {Header} from '@/shared/ui'; import GenericForm from '@/shared/ui/form/GenericForm'; @@ -28,7 +27,7 @@ const EmailLogin = () => {
logo
- + { priority />
- 이미 계정이 있으신가요? diff --git a/apps/front/wraffle-webview/src/widgets/login/EmailForm.tsx b/apps/front/wraffle-webview/src/widgets/login/EmailForm.tsx index b4ac34b6..ad2b2ed9 100644 --- a/apps/front/wraffle-webview/src/widgets/login/EmailForm.tsx +++ b/apps/front/wraffle-webview/src/widgets/login/EmailForm.tsx @@ -1,7 +1,7 @@ import {useFormContext} from 'react-hook-form'; import type {LoginPayload} from '@/entities/auth'; import {RHFInput} from '@/shared/ui'; -import {Button} from '@wraffle/ui'; +import {Button, Typography} from '@wraffle/ui'; const EmailForm = () => { const {formState} = useFormContext(); @@ -24,7 +24,9 @@ const EmailForm = () => { type='submit' disabled={!formState.isValid} > - 로그인 + + 로그인 + ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41604b5d..73cb3c51 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9731,6 +9731,8 @@ snapshots: '@expo/code-signing-certificates': 0.0.5 '@expo/config': 9.0.4 '@expo/config-plugins': 8.0.10 + '@expo/config': 9.0.4 + '@expo/config-plugins': 8.0.10 '@expo/devcert': 1.1.2 '@expo/env': 0.3.0 '@expo/image-utils': 0.5.1 @@ -9900,6 +9902,7 @@ snapshots: dependencies: '@babel/code-frame': 7.10.4 '@expo/config-plugins': 8.0.10 + '@expo/config-plugins': 8.0.10 '@expo/config-types': 51.0.3 '@expo/json-file': 8.3.3 getenv: 1.0.0 @@ -9968,6 +9971,7 @@ snapshots: '@babel/parser': 7.26.1 '@babel/types': 7.26.0 '@expo/config': 9.0.4 + '@expo/config': 9.0.4 '@expo/env': 0.3.0 '@expo/json-file': 8.3.3 '@expo/spawn-async': 1.7.2 @@ -10052,6 +10056,8 @@ snapshots: '@expo/prebuild-config@7.0.9(expo-modules-autolinking@1.11.2)': dependencies: + '@expo/config': 9.0.4 + '@expo/config-plugins': 8.0.10 '@expo/config': 9.0.4 '@expo/config-plugins': 8.0.10 '@expo/config-types': 51.0.3 @@ -10541,6 +10547,42 @@ snapshots: - ts-node '@jest/create-cache-key-function@29.7.0': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.14.14 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.14.14) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.7 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + optional: true + + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.3.3))': dependencies: '@jest/types': 29.6.3 @@ -13486,6 +13528,22 @@ snapshots: - ts-node cross-fetch@3.1.8: + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0 + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + optional: true + + create-jest@29.7.0(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.3.3)): dependencies: node-fetch: 2.7.0 transitivePeerDependencies: From d6ed646bd01cc0d81fddf2e5b7efe7aa99cdf4e7 Mon Sep 17 00:00:00 2001 From: woohee Date: Wed, 13 Nov 2024 22:01:15 +0900 Subject: [PATCH 10/70] =?UTF-8?q?[WRDS-45](fix):=20pnpm-lock=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=A9=EB=8F=8C=EB=A1=9C=20=EC=9D=B8=ED=95=B4=20?= =?UTF-8?q?pnpm=20=EC=9E=AC=EC=84=A4=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 190 +++++++++++++++++++++++++++++-------------------- 1 file changed, 114 insertions(+), 76 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73cb3c51..4733215f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,10 +13,10 @@ importers: version: 3.3.3 turbo: specifier: ^2.0.6 - version: 2.2.3 + version: 2.0.11 typescript: specifier: ^5.4.5 - version: 5.6.3 + version: 5.5.4 apps/admin: dependencies: @@ -38,10 +38,10 @@ importers: version: 20.17.3 '@types/react': specifier: ^18 - version: 18.3.12 + version: 18.2.79 '@types/react-dom': specifier: ^18 - version: 18.3.1 + version: 18.3.0 '@wraffle/eslint-config': specifier: workspace:* version: link:../../packages/shared/eslint-config @@ -56,22 +56,22 @@ importers: version: link:../../packages/shared/typescript-config autoprefixer: specifier: ^10.4.19 - version: 10.4.20(postcss@8.4.47) + version: 10.4.20(postcss@8.4.40) eslint: specifier: ^8 - version: 8.57.1 + version: 8.57.0 eslint-config-next: specifier: 14.2.5 - version: 14.2.5(eslint@8.57.1)(typescript@5.6.3) + version: 14.2.5(eslint@8.57.0)(typescript@5.5.4) postcss: specifier: ^8 - version: 8.4.47 + version: 8.4.40 tailwindcss: specifier: ^3.4.1 - version: 3.4.14 + version: 3.4.7(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) typescript: specifier: ^5 - version: 5.6.3 + version: 5.5.4 apps/front/wraffle-native: dependencies: @@ -162,7 +162,7 @@ importers: version: 7.26.0 '@types/jest': specifier: ^29.5.12 - version: 29.5.14 + version: 29.5.12 '@types/react': specifier: ~18.2.45 version: 18.2.79 @@ -201,7 +201,7 @@ importers: version: 2.1.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-slot': specifier: ^1.1.0 - version: 1.1.0(@types/react@18.3.12)(react@18.3.1) + version: 1.1.0(@types/react@18.3.3)(react@18.3.1) '@tanstack/react-query': specifier: ^5.53.1 version: 5.59.16(react@18.3.1) @@ -225,7 +225,7 @@ importers: version: 18.3.1(react@18.3.1) react-hook-form: specifier: ^7.53.0 - version: 7.53.1(react@18.3.1) + version: 7.53.0(react@18.3.1) zod: specifier: ^3.23.8 version: 3.23.8 @@ -235,10 +235,10 @@ importers: version: 20.17.3 '@types/react': specifier: ^18 - version: 18.3.12 + version: 18.3.3 '@types/react-dom': specifier: ^18 - version: 18.3.1 + version: 18.3.0 '@wraffle/eslint-config': specifier: workspace:* version: link:../../../packages/shared/eslint-config @@ -253,22 +253,22 @@ importers: version: link:../../../packages/shared/typescript-config autoprefixer: specifier: ^10.4.19 - version: 10.4.20(postcss@8.4.47) + version: 10.4.20(postcss@8.4.40) eslint: specifier: ^8 - version: 8.57.1 + version: 8.57.0 eslint-config-next: specifier: 14.2.5 - version: 14.2.5(eslint@8.57.1)(typescript@5.6.3) + version: 14.2.5(eslint@8.57.0)(typescript@5.5.4) postcss: specifier: ^8 - version: 8.4.47 + version: 8.4.40 tailwindcss: specifier: ^3.4.1 - version: 3.4.14 + version: 3.4.7(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) typescript: specifier: ^5 - version: 5.6.3 + version: 5.5.4 packages/shared/eslint-config: devDependencies: @@ -277,22 +277,22 @@ importers: version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/parser': specifier: ^7.1.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.6.3) + version: 7.18.0(eslint@8.57.0)(typescript@5.5.4) '@vercel/style-guide': specifier: ^5.2.0 version: 5.2.0(@next/eslint-plugin-next@14.2.5)(eslint@8.57.1)(jest@29.7.0)(prettier@3.3.3)(typescript@5.6.3) eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@8.57.1) + version: 9.1.0(eslint@8.57.0) eslint-config-turbo: specifier: ^2.0.0 - version: 2.2.3(eslint@8.57.1) + version: 2.0.11(eslint@8.57.0) eslint-plugin-only-warn: specifier: ^1.1.0 version: 1.1.0 typescript: specifier: ^5.3.3 - version: 5.6.3 + version: 5.5.4 packages/shared/prettier-config: devDependencies: @@ -313,10 +313,10 @@ importers: version: link:../typescript-config tailwindcss: specifier: ^3.4.1 - version: 3.4.14 + version: 3.4.7(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.14) + version: 1.0.7(tailwindcss@3.4.7(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))) packages/shared/typescript-config: {} @@ -348,7 +348,7 @@ importers: version: 2.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-slot': specifier: ^1.1.0 - version: 1.1.0(@types/react@18.3.12)(react@18.3.1) + version: 1.1.0(@types/react@18.3.3)(react@18.3.1) '@radix-ui/react-switch': specifier: ^1.1.0 version: 1.1.1(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -378,32 +378,32 @@ importers: version: 18.3.1(react@18.3.1) react-icons: specifier: ^5.2.1 - version: 5.3.0(react@18.3.1) + version: 5.2.1(react@18.3.1) tailwind-merge: specifier: ^2.4.0 - version: 2.5.4 + version: 2.4.0 tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.14) + version: 1.0.7(tailwindcss@3.4.7(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))) devDependencies: '@chromatic-com/storybook': specifier: ^1.6.1 version: 1.9.0(react@18.3.1) '@storybook/addon-docs': specifier: ^8.2.9 - version: 8.3.6(storybook@8.3.6) + version: 8.2.9(storybook@8.2.7(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@storybook/addon-essentials': specifier: ^8.2.2 - version: 8.3.6(storybook@8.3.6) + version: 8.2.7(storybook@8.2.7(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@storybook/addon-interactions': specifier: ^8.2.2 - version: 8.3.6(storybook@8.3.6) + version: 8.2.7(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)))(storybook@8.2.7(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@storybook/addon-links': specifier: ^8.2.2 - version: 8.3.6(react@18.3.1)(storybook@8.3.6) + version: 8.2.7(react@18.3.1)(storybook@8.2.7(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@storybook/addon-onboarding': specifier: ^8.2.2 - version: 8.3.6(react@18.3.1)(storybook@8.3.6) + version: 8.2.7(react@18.3.1)(storybook@8.2.7(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@storybook/blocks': specifier: ^8.2.2 version: 8.3.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.3.6) @@ -415,10 +415,10 @@ importers: version: 8.3.6(@storybook/test@8.3.6(storybook@8.3.6))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.24.3)(storybook@8.3.6)(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.4)(terser@5.36.0)) '@storybook/test': specifier: ^8.2.2 - version: 8.3.6(storybook@8.3.6) + version: 8.2.7(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)))(storybook@8.2.7(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@types/react': specifier: ^18.3.3 - version: 18.3.12 + version: 18.3.3 '@vitejs/plugin-react': specifier: ^4.3.1 version: 4.3.3(vite@5.4.10(@types/node@22.8.4)(terser@5.36.0)) @@ -436,19 +436,19 @@ importers: version: link:../shared/typescript-config autoprefixer: specifier: ^10.4.19 - version: 10.4.20(postcss@8.4.47) + version: 10.4.20(postcss@8.4.40) postcss: specifier: ^8.4.39 - version: 8.4.47 + version: 8.4.40 storybook: specifier: ^8.2.2 - version: 8.3.6 + version: 8.2.7(@babel/preset-env@7.25.3(@babel/core@7.25.2)) tailwindcss: specifier: ^3.4.4 - version: 3.4.14 + version: 3.4.7(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) typescript: specifier: ^5.5.3 - version: 5.6.3 + version: 5.5.4 vite: specifier: ^5.3.3 version: 5.4.10(@types/node@22.8.4)(terser@5.36.0) @@ -2968,7 +2968,7 @@ packages: resolution: {integrity: sha512-EGEH/kEjndEldbqyiJ8XSASkxqwzL/lgA/+6mHpa6Ljxhk1s5IMGcdA1ymJYJ2BpNdkUxRj/uxAa38eGcQiJ/g==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.3.6 + storybook: ^8.2.7 peerDependenciesMeta: react: optional: true @@ -3003,7 +3003,7 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.3.6 + storybook: ^8.2.7 peerDependenciesMeta: react: optional: true @@ -3014,7 +3014,7 @@ packages: resolution: {integrity: sha512-AF4+oFe1mvIHrLvaYsv8B0YSlXQtSlKTKwrXnUbcAbeGRwMmFKA1t3VyAcXV0yB9MtZ8YJsA/uKRkgGEaN7wJQ==} peerDependencies: '@preact/preset-vite': '*' - storybook: ^8.3.6 + storybook: ^8.2.7 typescript: '>= 4.3.x' vite: ^4.0.0 || ^5.0.0 vite-plugin-glimmerx: '*' @@ -3080,21 +3080,18 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.3.6 + storybook: ^8.2.7 vite: ^4.0.0 || ^5.0.0 '@storybook/react@8.3.6': resolution: {integrity: sha512-s3COryqIOYK7urgZaCPb77zlxGjPKr6dIsYmblQJcsFY2ZlG2x0Ysm8b5oRgD8Pv71hCJ0PKYA4RzDgBVYJS9A==} engines: {node: '>=18.0.0'} peerDependencies: - '@storybook/test': 8.3.6 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - storybook: ^8.3.6 + storybook: ^8.2.7 typescript: '>= 4.2.x' peerDependenciesMeta: - '@storybook/test': - optional: true typescript: optional: true @@ -4708,7 +4705,7 @@ packages: engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 peerDependenciesMeta: '@typescript-eslint/parser': optional: true @@ -4882,23 +4879,23 @@ packages: peerDependencies: expo: '*' - expo-dev-client@4.0.28: - resolution: {integrity: sha512-wz5G4vY3Gbk5GuQTyijdqY4Hwr/NDt5OUTErbOu1vd4XRIAsI+8IkK5hsBUhGmqrdkYnP5NxxOxC/soFzX/9+w==} + expo-dev-client@4.0.29: + resolution: {integrity: sha512-aANlw9dC4PJEPaRNpe+X5xwyYI+aCIcbZklAAsFlkv2/05gLrsvAFgmQpRtowAzF+VggHWde1eKUOeUccAYIEg==} peerDependencies: expo: '*' - expo-dev-launcher@4.0.28: - resolution: {integrity: sha512-goE7jcaGVA2zu4gV3/hQ9RXqGhUZZAu339VYNLbwPdaNCzFaG6A8MZHg18gytCUnZ5QkRJsYi4q/8YcwUCASlQ==} + expo-dev-launcher@4.0.29: + resolution: {integrity: sha512-0a0SL8mc4FrqPeGxJHe9kf0kG+Di+38Gd+HP5DEL9dcOa8m2qffKnk22UcyujCT6+Qk0OUK1s53nnfqFB26uVw==} peerDependencies: expo: '*' - expo-dev-menu-interface@1.8.3: - resolution: {integrity: sha512-QM0LRozeFT5Ek0N7XpV93M+HMdEKRLEOXn0aW5M3uoUlnqC1+PLtF3HMy3k3hMKTTE/kJ1y1Z7akH07T0lunCQ==} + expo-dev-menu-interface@1.8.4: + resolution: {integrity: sha512-FpYI57EUu9qTSOOi+FZJ58xkCGJK7QD0mTiXK/y1I8lRdZGjCmdBqVvC4dAx2GcbIT78EPxaVf4/90tK/KRK6A==} peerDependencies: expo: '*' - expo-dev-menu@5.0.22: - resolution: {integrity: sha512-VzpdQReAtjbI1qIuwOf0sUzf91HsfGThojgJD9Ez0eca12qY5tTGYzHa1EM9V+zIcNuNZ7+A8bHJJdmZ4zvU6g==} + expo-dev-menu@5.0.23: + resolution: {integrity: sha512-ztDvrSdFGkRbMoQlGLyKMS6CslMGylonVW4kQHUrBQApCL0c2NtRwLlr2bA1SXF0S7qYdPPg/ayLnj7DDR5X2w==} peerDependencies: expo: '*' @@ -6864,7 +6861,6 @@ packages: prettier-plugin-import-sort: '*' prettier-plugin-jsdoc: '*' prettier-plugin-marko: '*' - prettier-plugin-multiline-arrays: '*' prettier-plugin-organize-attributes: '*' prettier-plugin-organize-imports: '*' prettier-plugin-sort-imports: '*' @@ -6891,8 +6887,6 @@ packages: optional: true prettier-plugin-marko: optional: true - prettier-plugin-multiline-arrays: - optional: true prettier-plugin-organize-attributes: optional: true prettier-plugin-organize-imports: @@ -8260,7 +8254,6 @@ packages: less: '*' lightningcss: ^1.21.0 sass: '*' - sass-embedded: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 @@ -8273,8 +8266,6 @@ packages: optional: true sass: optional: true - sass-embedded: - optional: true stylus: optional: true sugarss: @@ -9731,8 +9722,6 @@ snapshots: '@expo/code-signing-certificates': 0.0.5 '@expo/config': 9.0.4 '@expo/config-plugins': 8.0.10 - '@expo/config': 9.0.4 - '@expo/config-plugins': 8.0.10 '@expo/devcert': 1.1.2 '@expo/env': 0.3.0 '@expo/image-utils': 0.5.1 @@ -9752,7 +9741,7 @@ snapshots: arg: 5.0.2 better-opn: 3.0.2 bplist-creator: 0.0.7 - bplist-parser: 0.3.2 + bplist-parser: 0.3.1 cacache: 18.0.4 chalk: 4.1.2 ci-info: 3.9.0 @@ -9902,7 +9891,6 @@ snapshots: dependencies: '@babel/code-frame': 7.10.4 '@expo/config-plugins': 8.0.10 - '@expo/config-plugins': 8.0.10 '@expo/config-types': 51.0.3 '@expo/json-file': 8.3.3 getenv: 1.0.0 @@ -10056,8 +10044,6 @@ snapshots: '@expo/prebuild-config@7.0.9(expo-modules-autolinking@1.11.2)': dependencies: - '@expo/config': 9.0.4 - '@expo/config-plugins': 8.0.10 '@expo/config': 9.0.4 '@expo/config-plugins': 8.0.10 '@expo/config-types': 51.0.3 @@ -10546,6 +10532,41 @@ snapshots: - supports-color - ts-node + '@jest/create-cache-key-function@29.7.0': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.17.3 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.17.3) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + '@jest/create-cache-key-function@29.7.0': dependencies: '@jest/console': 29.7.0 @@ -10582,7 +10603,7 @@ snapshots: - ts-node optional: true - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.3.3))': + '@jest/create-cache-key-function@29.7.0': dependencies: '@jest/types': 29.6.3 @@ -12295,7 +12316,6 @@ snapshots: '@types/istanbul-reports@1.1.2': dependencies: - '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-lib-report': 3.0.3 '@types/istanbul-reports@3.0.4': @@ -13533,7 +13553,22 @@ snapshots: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0 + jest-config: 29.7.0(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.3.3)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + + create-jest@29.7.0(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -13543,7 +13578,10 @@ snapshots: - ts-node optional: true - create-jest@29.7.0(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.3.3)): + create-require@1.1.1: + optional: true + + cross-fetch@3.1.8: dependencies: node-fetch: 2.7.0 transitivePeerDependencies: From 8df8b3d5611ad66c1f9505a4cec5f6e3b1c207cd Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Wed, 6 Nov 2024 20:01:11 +0900 Subject: [PATCH 11/70] =?UTF-8?q?[WRFE-55](fix):=20RaffleCard=20Price=20?= =?UTF-8?q?=ED=83=80=EC=9E=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/src/ui/raffle-card/RaffleCard.mdx | 4 ++-- packages/ui/src/ui/raffle-card/RaffleCard.stories.tsx | 2 +- packages/ui/src/ui/raffle-card/RaffleCard.tsx | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/ui/src/ui/raffle-card/RaffleCard.mdx b/packages/ui/src/ui/raffle-card/RaffleCard.mdx index e7d17f8a..499009df 100644 --- a/packages/ui/src/ui/raffle-card/RaffleCard.mdx +++ b/packages/ui/src/ui/raffle-card/RaffleCard.mdx @@ -1,6 +1,6 @@ -import { Meta, Story, Controls, Canvas, Primary } from "@storybook/blocks"; +import {Meta, Story, Controls, Canvas, Primary} from '@storybook/blocks'; -import * as stories from "./RaffleCard.stories"; +import * as stories from './RaffleCard.stories'; diff --git a/packages/ui/src/ui/raffle-card/RaffleCard.stories.tsx b/packages/ui/src/ui/raffle-card/RaffleCard.stories.tsx index 5dd89c8a..41f78b38 100644 --- a/packages/ui/src/ui/raffle-card/RaffleCard.stories.tsx +++ b/packages/ui/src/ui/raffle-card/RaffleCard.stories.tsx @@ -29,7 +29,7 @@ const meta: Meta = { }, args: { name: '[Vans] 올드스쿨', - price: '78,000', + price: 78000, hashtags: [ { id: 1, diff --git a/packages/ui/src/ui/raffle-card/RaffleCard.tsx b/packages/ui/src/ui/raffle-card/RaffleCard.tsx index 1ba80134..ce5ba2a1 100644 --- a/packages/ui/src/ui/raffle-card/RaffleCard.tsx +++ b/packages/ui/src/ui/raffle-card/RaffleCard.tsx @@ -5,7 +5,7 @@ import {Icon} from '@wds/ui/icon/Icon'; export interface RaffleCardProps { name: string; - price: string; + price: number; hashtags: TagType[]; scrapCount: number; thumbnailUrl: string; @@ -40,10 +40,10 @@ const RaffleCard = ({
)}
- + {name} - + {price}원 From a4c311aaf5d24388b1d8ad29e0f2d662ad674be4 Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Wed, 6 Nov 2024 20:02:54 +0900 Subject: [PATCH 12/70] =?UTF-8?q?[WRFE-55](rename):=20features=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=20=EA=B2=BD=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/app/password/find/page.tsx | 2 +- apps/front/wraffle-webview/app/password/reset/page.tsx | 2 +- .../wraffle-webview/{ => src}/features/password/api/password.ts | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename apps/front/wraffle-webview/{ => src}/features/password/api/password.ts (100%) diff --git a/apps/front/wraffle-webview/app/password/find/page.tsx b/apps/front/wraffle-webview/app/password/find/page.tsx index cd5353d9..2864dcf1 100644 --- a/apps/front/wraffle-webview/app/password/find/page.tsx +++ b/apps/front/wraffle-webview/app/password/find/page.tsx @@ -1,9 +1,9 @@ 'use client'; -import {useSendEmail} from 'features/password/api/password'; import {useRouter} from 'next/navigation'; import {useForm} from 'react-hook-form'; import {type EmailPayload, emailObjectSchema} from '@/entities/auth'; +import {useSendEmail} from '@/features/password/api/password'; import {Form, RHFInput} from '@/shared/ui'; import {Header} from '@/shared/ui'; import BottomFixedBox from '@/shared/ui/bottom/BottomFixedBox'; diff --git a/apps/front/wraffle-webview/app/password/reset/page.tsx b/apps/front/wraffle-webview/app/password/reset/page.tsx index c51f6d58..ae9e6053 100644 --- a/apps/front/wraffle-webview/app/password/reset/page.tsx +++ b/apps/front/wraffle-webview/app/password/reset/page.tsx @@ -1,9 +1,9 @@ 'use client'; -import {useResetPassword} from 'features/password/api/password'; import {useRouter, useSearchParams} from 'next/navigation'; import {useForm} from 'react-hook-form'; import {type PasswordPayload, passwordObjectSchema} from '@/entities/auth'; +import {useResetPassword} from '@/features/password/api/password'; import {Form, RHFInput} from '@/shared/ui'; import {Header} from '@/shared/ui'; import BottomFixedBox from '@/shared/ui/bottom/BottomFixedBox'; diff --git a/apps/front/wraffle-webview/features/password/api/password.ts b/apps/front/wraffle-webview/src/features/password/api/password.ts similarity index 100% rename from apps/front/wraffle-webview/features/password/api/password.ts rename to apps/front/wraffle-webview/src/features/password/api/password.ts From a1df87388ef6325af944dbc8ea1b6b766906550b Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Wed, 6 Nov 2024 20:06:15 +0900 Subject: [PATCH 13/70] =?UTF-8?q?[WRFE-55](feat):=20=EC=B5=9C=EC=8B=A0=20?= =?UTF-8?q?=EB=9E=98=ED=94=8C=20Banner=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/entities/banner/constants.ts | 10 ++++++ .../src/entities/banner/type.ts | 7 ++++ .../src/features/manage-raffle/ui/Banner.tsx | 33 +++++++++++++++++++ .../src/shared/ui/header/core/Logo.tsx | 2 +- .../ui/bottomNavigation/BottomNavigation.tsx | 6 ++-- 5 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 apps/front/wraffle-webview/src/entities/banner/constants.ts create mode 100644 apps/front/wraffle-webview/src/entities/banner/type.ts create mode 100644 apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx diff --git a/apps/front/wraffle-webview/src/entities/banner/constants.ts b/apps/front/wraffle-webview/src/entities/banner/constants.ts new file mode 100644 index 00000000..339531c9 --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/banner/constants.ts @@ -0,0 +1,10 @@ +import type {RecentRaffle} from './type'; + +export const RecentRaffles: RecentRaffle = { + id: 1, + title: '이번주 최신 래플 ❤️', + subTitle: '🎄기간한정🎄', + imageUrl: + 'https://image.vans.co.kr/cmsstatic/product/VN000D3HY281_VN000D3HY281_primary.jpg', + toGoUrl: '/', +}; diff --git a/apps/front/wraffle-webview/src/entities/banner/type.ts b/apps/front/wraffle-webview/src/entities/banner/type.ts new file mode 100644 index 00000000..9236fb6d --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/banner/type.ts @@ -0,0 +1,7 @@ +export interface RecentRaffle { + id: number; + title: string; + subTitle: string; + imageUrl: string; + toGoUrl: string; +} diff --git a/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx b/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx new file mode 100644 index 00000000..19eb5515 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx @@ -0,0 +1,33 @@ +'use client'; + +import Image from 'next/image'; +import {useRouter} from 'next/navigation'; +import type {RecentRaffle} from '@/entities/banner/type'; +import {Typography} from '@wraffle/ui'; + +interface BannerProps { + recentRaflle: RecentRaffle; +} + +const Banner = ({recentRaflle}: BannerProps) => { + const {id, title, subTitle, imageUrl, toGoUrl} = recentRaflle; + const router = useRouter(); + return ( +
router.push(toGoUrl)} + > + {`${id} +
+ + {title} + + + {subTitle} + +
+
+ ); +}; + +export default Banner; diff --git a/apps/front/wraffle-webview/src/shared/ui/header/core/Logo.tsx b/apps/front/wraffle-webview/src/shared/ui/header/core/Logo.tsx index bc029de5..71e57f28 100644 --- a/apps/front/wraffle-webview/src/shared/ui/header/core/Logo.tsx +++ b/apps/front/wraffle-webview/src/shared/ui/header/core/Logo.tsx @@ -3,7 +3,7 @@ import Image from 'next/image'; export const Logo = () => { return (
- logo + logo
); }; diff --git a/packages/ui/src/ui/bottomNavigation/BottomNavigation.tsx b/packages/ui/src/ui/bottomNavigation/BottomNavigation.tsx index c5fb9f4c..d9aef547 100644 --- a/packages/ui/src/ui/bottomNavigation/BottomNavigation.tsx +++ b/packages/ui/src/ui/bottomNavigation/BottomNavigation.tsx @@ -18,7 +18,7 @@ const menuItems: ItemType[] = [ {name: 'user-circle', label: '내정보'}, ]; -export default function BottomNavigation() { +const BottomNavigation = () => { const [selectedIcon, setSelectedIcon] = useState('홈'); const handleClickIcon = (label: string) => { @@ -44,4 +44,6 @@ export default function BottomNavigation() {
); -} +}; + +export {BottomNavigation}; From 8f2d4e461ceaca3fe0b4adacc6feeefe4688eb1c Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Wed, 6 Nov 2024 20:07:01 +0900 Subject: [PATCH 14/70] =?UTF-8?q?[WRFE-55](feat):=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC=20=EB=AA=A9=EB=A1=9D=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?UI=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/next.config.mjs | 4 + .../src/entities/category/constants.ts | 76 +++++++++++++++++++ .../src/entities/category/type.ts | 6 ++ .../get-category/ui/CategoryButton.tsx | 25 ++++++ .../category-list/ui/CategoryButtons.tsx | 20 +++++ 5 files changed, 131 insertions(+) create mode 100644 apps/front/wraffle-webview/src/entities/category/constants.ts create mode 100644 apps/front/wraffle-webview/src/entities/category/type.ts create mode 100644 apps/front/wraffle-webview/src/features/get-category/ui/CategoryButton.tsx create mode 100644 apps/front/wraffle-webview/src/widgets/category-list/ui/CategoryButtons.tsx diff --git a/apps/front/wraffle-webview/next.config.mjs b/apps/front/wraffle-webview/next.config.mjs index 9510663a..8a7360a5 100644 --- a/apps/front/wraffle-webview/next.config.mjs +++ b/apps/front/wraffle-webview/next.config.mjs @@ -21,6 +21,10 @@ const nextConfig = { experimental: { optimizePackageImports: ['@wraffle/ui'], }, + // !TODO: API 연동 후 삭제 + images: { + domains: ['image.vans.co.kr', '*'], + }, }; export default nextConfig; diff --git a/apps/front/wraffle-webview/src/entities/category/constants.ts b/apps/front/wraffle-webview/src/entities/category/constants.ts new file mode 100644 index 00000000..3312e80e --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/category/constants.ts @@ -0,0 +1,76 @@ +import type {CategoryItem} from './type'; + +export const categories: CategoryItem[] = [ + { + id: 1, + name: '패션', + parentId: null, + depth: 1, + }, + { + id: 2, + name: '가전 디지털', + parentId: null, + depth: 1, + }, + { + id: 3, + name: '전자제품', + parentId: null, + depth: 1, + }, + { + id: 4, + name: '식품', + parentId: null, + depth: 1, + }, + { + id: 5, + name: '의류', + parentId: null, + depth: 1, + }, + { + id: 6, + name: '생활', + parentId: null, + depth: 1, + }, + { + id: 11, + name: '패션', + parentId: null, + depth: 1, + }, + { + id: 12, + name: '가전 디지털', + parentId: null, + depth: 1, + }, + { + id: 13, + name: '전자 제품', + parentId: null, + depth: 1, + }, + { + id: 14, + name: '식품', + parentId: null, + depth: 1, + }, + { + id: 15, + name: '의류', + parentId: null, + depth: 1, + }, + { + id: 16, + name: '생활', + parentId: null, + depth: 1, + }, +]; diff --git a/apps/front/wraffle-webview/src/entities/category/type.ts b/apps/front/wraffle-webview/src/entities/category/type.ts new file mode 100644 index 00000000..d53573d2 --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/category/type.ts @@ -0,0 +1,6 @@ +export interface CategoryItem { + id: number; + name: string; + parentId: number | null; + depth: number; +} diff --git a/apps/front/wraffle-webview/src/features/get-category/ui/CategoryButton.tsx b/apps/front/wraffle-webview/src/features/get-category/ui/CategoryButton.tsx new file mode 100644 index 00000000..90efe804 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/get-category/ui/CategoryButton.tsx @@ -0,0 +1,25 @@ +'use client'; + +import {useRouter} from 'next/navigation'; +import type {CategoryItem} from '@/entities/category/type'; +import {Typography} from '@wraffle/ui'; + +interface CategoryButtonProps { + category: CategoryItem; +} + +const CategoryButton = ({category}: CategoryButtonProps) => { + const router = useRouter(); + return ( + + ); +}; + +export default CategoryButton; diff --git a/apps/front/wraffle-webview/src/widgets/category-list/ui/CategoryButtons.tsx b/apps/front/wraffle-webview/src/widgets/category-list/ui/CategoryButtons.tsx new file mode 100644 index 00000000..d4db1b10 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/category-list/ui/CategoryButtons.tsx @@ -0,0 +1,20 @@ +import type {CategoryItem} from '@/entities/category/type'; +import CategoryButton from '@/features/get-category/ui/CategoryButton'; + +interface CategoryButtonsProps { + categories: CategoryItem[]; +} + +const CategoryButtons = ({categories}: CategoryButtonsProps) => { + return ( +
+
+ {categories.map(category => ( + + ))} +
+
+ ); +}; + +export default CategoryButtons; From 5ee963602131cd28e5a475c3558670c7dbb13df8 Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Wed, 6 Nov 2024 20:07:21 +0900 Subject: [PATCH 15/70] =?UTF-8?q?[WRFE-55](feat):=20=EC=B5=9C=EC=8B=A0=20?= =?UTF-8?q?=EB=9E=98=ED=94=8C=20=EB=AA=A9=EB=A1=9D=20UI=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/entities/raffle/contants.ts | 3 + .../entities/raffle/recommend/constants.ts | 84 +++++++++++++++++++ .../src/entities/raffle/recommend/type.ts | 13 +++ .../recommend-list/ui/RecommendList.tsx | 30 +++++++ 4 files changed, 130 insertions(+) create mode 100644 apps/front/wraffle-webview/src/entities/raffle/contants.ts create mode 100644 apps/front/wraffle-webview/src/entities/raffle/recommend/constants.ts create mode 100644 apps/front/wraffle-webview/src/entities/raffle/recommend/type.ts create mode 100644 apps/front/wraffle-webview/src/widgets/recommend-list/ui/RecommendList.tsx diff --git a/apps/front/wraffle-webview/src/entities/raffle/contants.ts b/apps/front/wraffle-webview/src/entities/raffle/contants.ts new file mode 100644 index 00000000..4daa4c57 --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/raffle/contants.ts @@ -0,0 +1,3 @@ +export const RAFFLE_TYPE = ['RAFFLE', 'EVENT'] as const; + +export type RaffleType = (typeof RAFFLE_TYPE)[number]; diff --git a/apps/front/wraffle-webview/src/entities/raffle/recommend/constants.ts b/apps/front/wraffle-webview/src/entities/raffle/recommend/constants.ts new file mode 100644 index 00000000..22195f59 --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/raffle/recommend/constants.ts @@ -0,0 +1,84 @@ +import type {RecommendRaffle} from './type'; + +export const recommendItems: RecommendRaffle[] = [ + { + id: 1, + type: 'RAFFLE', + title: '[Vans] 올드스쿨', + price: 78000, + clipCount: 2, + hashtags: [ + { + id: 1, + name: '한정판', + }, + { + id: 2, + name: 'Vans', + }, + ], + thumbnail: + 'https://image.vans.co.kr/cmsstatic/product/VN000D3HY281_VN000D3HY281_primary.jpg', + isBookmarked: false, + }, + { + id: 2, + type: 'RAFFLE', + title: '[Vans] 올드스쿨', + price: 78000, + clipCount: 2, + hashtags: [ + { + id: 1, + name: '한정판', + }, + { + id: 2, + name: 'Vans', + }, + ], + thumbnail: + 'https://image.vans.co.kr/cmsstatic/product/VN000D3HY281_VN000D3HY281_primary.jpg', + isBookmarked: false, + }, + { + id: 3, + type: 'RAFFLE', + title: '[Vans] 올드스쿨', + price: 78000, + clipCount: 2, + hashtags: [ + { + id: 1, + name: '한정판', + }, + { + id: 2, + name: 'Vans', + }, + ], + thumbnail: + 'https://image.vans.co.kr/cmsstatic/product/VN000D3HY281_VN000D3HY281_primary.jpg', + isBookmarked: false, + }, + { + id: 4, + type: 'RAFFLE', + title: '[Vans] 올드스쿨', + price: 78000, + clipCount: 2, + hashtags: [ + { + id: 1, + name: '한정판', + }, + { + id: 2, + name: 'Vans', + }, + ], + thumbnail: + 'https://image.vans.co.kr/cmsstatic/product/VN000D3HY281_VN000D3HY281_primary.jpg', + isBookmarked: false, + }, +]; diff --git a/apps/front/wraffle-webview/src/entities/raffle/recommend/type.ts b/apps/front/wraffle-webview/src/entities/raffle/recommend/type.ts new file mode 100644 index 00000000..9707e1cc --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/raffle/recommend/type.ts @@ -0,0 +1,13 @@ +import type {RaffleType} from '../contants'; +import type {TagType} from '@wraffle/ui'; + +export interface RecommendRaffle { + id: number; + type: RaffleType; + title: string; + price: number; + clipCount: number; + hashtags: TagType[]; + thumbnail: string; + isBookmarked: boolean; +} diff --git a/apps/front/wraffle-webview/src/widgets/recommend-list/ui/RecommendList.tsx b/apps/front/wraffle-webview/src/widgets/recommend-list/ui/RecommendList.tsx new file mode 100644 index 00000000..d5f1128d --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/recommend-list/ui/RecommendList.tsx @@ -0,0 +1,30 @@ +import type {RecommendRaffle} from '@/entities/raffle/recommend/type'; +import {RaffleCard, Typography} from '@wraffle/ui'; + +interface RecommendListProps { + recommendItems: RecommendRaffle[]; +} + +const RecommendList = ({recommendItems}: RecommendListProps) => { + return ( +
+ + 이번주 추천 래플 + +
+ {recommendItems.map(item => ( + + ))} +
+
+ ); +}; + +export default RecommendList; From a06da0a2bf89ea5588cdde29979c7357e948d8cb Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Wed, 6 Nov 2024 20:07:41 +0900 Subject: [PATCH 16/70] =?UTF-8?q?[WRFE-55](feat):=20=ED=99=88=20UI=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/app/page.tsx | 134 ++++-------------- .../src/shared/ui/form/RHF/RHFInput.tsx | 2 + pnpm-lock.yaml | 8 +- 3 files changed, 32 insertions(+), 112 deletions(-) diff --git a/apps/front/wraffle-webview/app/page.tsx b/apps/front/wraffle-webview/app/page.tsx index f453fa8c..a602f6ec 100644 --- a/apps/front/wraffle-webview/app/page.tsx +++ b/apps/front/wraffle-webview/app/page.tsx @@ -1,113 +1,33 @@ -import Image from 'next/image'; +import {RecentRaffles} from '@/entities/banner/constants'; +import {categories} from '@/entities/category/constants'; +import {recommendItems} from '@/entities/raffle/recommend/constants'; +import Banner from '@/features/manage-raffle/ui/Banner'; +import {Header} from '@/shared/ui'; +import CategoryButtons from '@/widgets/category-list/ui/CategoryButtons'; +import RecommendList from '@/widgets/recommend-list/ui/RecommendList'; +import {BottomNavigation, Icon} from '@wraffle/ui'; export default function Home() { return ( -
-
-

- Get started by editing  - src/app/page.tsx -

- -
- -
- Next.js Logo -
- - +
+
+ + + + + + +
+
+ +
+
+ +
+
+ +
+
); } diff --git a/apps/front/wraffle-webview/src/shared/ui/form/RHF/RHFInput.tsx b/apps/front/wraffle-webview/src/shared/ui/form/RHF/RHFInput.tsx index 16edb43c..91386a40 100644 --- a/apps/front/wraffle-webview/src/shared/ui/form/RHF/RHFInput.tsx +++ b/apps/front/wraffle-webview/src/shared/ui/form/RHF/RHFInput.tsx @@ -1,3 +1,5 @@ +'use client'; + import { FormControl, FormDescription, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4733215f..c823d56f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11674,9 +11674,7 @@ snapshots: transitivePeerDependencies: - '@babel/core' - '@babel/preset-env' - - bufferutil - supports-color - - utf-8-validate '@react-native/normalize-colors@0.74.84': {} @@ -14001,7 +13999,7 @@ snapshots: eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) eslint-plugin-react: 7.37.2(eslint@8.57.1) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1) @@ -14064,7 +14062,7 @@ snapshots: is-bun-module: 1.2.1 is-glob: 4.0.3 optionalDependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-node @@ -14138,7 +14136,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.2.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 From fd10e24e5629ff9726675855840d5a00a0b35724 Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Wed, 6 Nov 2024 20:09:22 +0900 Subject: [PATCH 17/70] =?UTF-8?q?[WRFE-55](chore):=20pnpm-lock=20file=20?= =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c823d56f..3130a299 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3573,6 +3573,7 @@ packages: '@xmldom/xmldom@0.7.13': resolution: {integrity: sha512-lm2GW5PkosIzccsaZIz7tp8cPADSIlIHWDFTR1N0SzfinhhYgeIQjFMz4rYzanCScr3DqQLeomUDArp6MWKm+g==} engines: {node: '>=10.0.0'} + deprecated: this version is no longer supported, please update to at least 0.8.* '@xmldom/xmldom@0.8.10': resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} @@ -3718,10 +3719,7 @@ packages: engines: {node: '>=10'} aria-query@5.3.0: - resolution: - { - integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==, - } + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} aria-query@5.3.2: resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} @@ -3731,13 +3729,6 @@ packages: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} - array-buffer-byte-length@1.0.1: - resolution: - { - integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==, - } - engines: { node: '>= 0.4' } - array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} From 63afd8bbb1858fdabdf5c4f110f2be73e6008fa5 Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Mon, 11 Nov 2024 02:54:09 +0900 Subject: [PATCH 18/70] =?UTF-8?q?[WRFE-55](refactor):=20=ED=99=88=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=EA=B5=AC=EC=A1=B0=20=EB=A6=AC=ED=8C=A9?= =?UTF-8?q?=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/app/page.tsx | 12 +-- apps/front/wraffle-webview/next.config.mjs | 7 +- .../category/{constants.ts => const.ts} | 0 .../src/entities/category/index.ts | 2 + .../entities/raffle/{contants.ts => const.ts} | 2 - .../src/entities/raffle/index.ts | 2 + .../entities/raffle/{recommend => }/type.ts | 10 +-- .../get-category/ui/CategoryButton.tsx | 4 +- .../src/features/get-category/ui/index.ts | 1 + .../manage-raffle/config/const.ts} | 2 +- .../features/manage-raffle/config/index.ts | 1 + .../src/features/manage-raffle/model/index.ts | 2 + .../manage-raffle/model/recent.ts} | 0 .../features/manage-raffle/model/recommend.ts | 6 ++ .../src/features/manage-raffle/ui/Banner.tsx | 4 +- .../src/features/manage-raffle/ui/index.ts | 1 + .../src/widgets/category-list/config/const.ts | 76 +++++++++++++++++++ .../src/widgets/category-list/config/index.ts | 1 + .../category-list/ui/CategoryButtons.tsx | 4 +- .../src/widgets/category-list/ui/index.ts | 1 + .../recommend-list/config/const.ts} | 2 +- .../widgets/recommend-list/config/index.ts | 1 + .../recommend-list/ui/RecommendList.tsx | 4 +- .../src/widgets/recommend-list/ui/index.ts | 1 + 24 files changed, 122 insertions(+), 24 deletions(-) rename apps/front/wraffle-webview/src/entities/category/{constants.ts => const.ts} (100%) create mode 100644 apps/front/wraffle-webview/src/entities/category/index.ts rename apps/front/wraffle-webview/src/entities/raffle/{contants.ts => const.ts} (50%) create mode 100644 apps/front/wraffle-webview/src/entities/raffle/index.ts rename apps/front/wraffle-webview/src/entities/raffle/{recommend => }/type.ts (55%) create mode 100644 apps/front/wraffle-webview/src/features/get-category/ui/index.ts rename apps/front/wraffle-webview/src/{entities/banner/constants.ts => features/manage-raffle/config/const.ts} (85%) create mode 100644 apps/front/wraffle-webview/src/features/manage-raffle/config/index.ts create mode 100644 apps/front/wraffle-webview/src/features/manage-raffle/model/index.ts rename apps/front/wraffle-webview/src/{entities/banner/type.ts => features/manage-raffle/model/recent.ts} (100%) create mode 100644 apps/front/wraffle-webview/src/features/manage-raffle/model/recommend.ts create mode 100644 apps/front/wraffle-webview/src/features/manage-raffle/ui/index.ts create mode 100644 apps/front/wraffle-webview/src/widgets/category-list/config/const.ts create mode 100644 apps/front/wraffle-webview/src/widgets/category-list/config/index.ts create mode 100644 apps/front/wraffle-webview/src/widgets/category-list/ui/index.ts rename apps/front/wraffle-webview/src/{entities/raffle/recommend/constants.ts => widgets/recommend-list/config/const.ts} (95%) create mode 100644 apps/front/wraffle-webview/src/widgets/recommend-list/config/index.ts create mode 100644 apps/front/wraffle-webview/src/widgets/recommend-list/ui/index.ts diff --git a/apps/front/wraffle-webview/app/page.tsx b/apps/front/wraffle-webview/app/page.tsx index a602f6ec..9480af9c 100644 --- a/apps/front/wraffle-webview/app/page.tsx +++ b/apps/front/wraffle-webview/app/page.tsx @@ -1,10 +1,10 @@ -import {RecentRaffles} from '@/entities/banner/constants'; -import {categories} from '@/entities/category/constants'; -import {recommendItems} from '@/entities/raffle/recommend/constants'; -import Banner from '@/features/manage-raffle/ui/Banner'; +import {categories} from '@/entities/category'; +import {RecentRaffles} from '@/features/manage-raffle/config'; +import {Banner} from '@/features/manage-raffle/ui'; import {Header} from '@/shared/ui'; -import CategoryButtons from '@/widgets/category-list/ui/CategoryButtons'; -import RecommendList from '@/widgets/recommend-list/ui/RecommendList'; +import {CategoryButtons} from '@/widgets/category-list/ui'; +import {recommendItems} from '@/widgets/recommend-list/config'; +import {RecommendList} from '@/widgets/recommend-list/ui'; import {BottomNavigation, Icon} from '@wraffle/ui'; export default function Home() { diff --git a/apps/front/wraffle-webview/next.config.mjs b/apps/front/wraffle-webview/next.config.mjs index 8a7360a5..a963db40 100644 --- a/apps/front/wraffle-webview/next.config.mjs +++ b/apps/front/wraffle-webview/next.config.mjs @@ -23,7 +23,12 @@ const nextConfig = { }, // !TODO: API 연동 후 삭제 images: { - domains: ['image.vans.co.kr', '*'], + remotePatterns: [ + { + protocol: 'https', + hostname: 'image.vans.co.kr', + }, + ], }, }; diff --git a/apps/front/wraffle-webview/src/entities/category/constants.ts b/apps/front/wraffle-webview/src/entities/category/const.ts similarity index 100% rename from apps/front/wraffle-webview/src/entities/category/constants.ts rename to apps/front/wraffle-webview/src/entities/category/const.ts diff --git a/apps/front/wraffle-webview/src/entities/category/index.ts b/apps/front/wraffle-webview/src/entities/category/index.ts new file mode 100644 index 00000000..9711ec4a --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/category/index.ts @@ -0,0 +1,2 @@ +export * from './const'; +export * from './type'; diff --git a/apps/front/wraffle-webview/src/entities/raffle/contants.ts b/apps/front/wraffle-webview/src/entities/raffle/const.ts similarity index 50% rename from apps/front/wraffle-webview/src/entities/raffle/contants.ts rename to apps/front/wraffle-webview/src/entities/raffle/const.ts index 4daa4c57..c73b3dcc 100644 --- a/apps/front/wraffle-webview/src/entities/raffle/contants.ts +++ b/apps/front/wraffle-webview/src/entities/raffle/const.ts @@ -1,3 +1 @@ export const RAFFLE_TYPE = ['RAFFLE', 'EVENT'] as const; - -export type RaffleType = (typeof RAFFLE_TYPE)[number]; diff --git a/apps/front/wraffle-webview/src/entities/raffle/index.ts b/apps/front/wraffle-webview/src/entities/raffle/index.ts new file mode 100644 index 00000000..9711ec4a --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/raffle/index.ts @@ -0,0 +1,2 @@ +export * from './const'; +export * from './type'; diff --git a/apps/front/wraffle-webview/src/entities/raffle/recommend/type.ts b/apps/front/wraffle-webview/src/entities/raffle/type.ts similarity index 55% rename from apps/front/wraffle-webview/src/entities/raffle/recommend/type.ts rename to apps/front/wraffle-webview/src/entities/raffle/type.ts index 9707e1cc..6969fd45 100644 --- a/apps/front/wraffle-webview/src/entities/raffle/recommend/type.ts +++ b/apps/front/wraffle-webview/src/entities/raffle/type.ts @@ -1,13 +1,13 @@ -import type {RaffleType} from '../contants'; +import type {RAFFLE_TYPE} from './const'; import type {TagType} from '@wraffle/ui'; -export interface RecommendRaffle { +export interface Raffle { id: number; - type: RaffleType; title: string; price: number; + thumbnail: string; clipCount: number; hashtags: TagType[]; - thumbnail: string; - isBookmarked: boolean; } + +export type RaffleType = (typeof RAFFLE_TYPE)[number]; diff --git a/apps/front/wraffle-webview/src/features/get-category/ui/CategoryButton.tsx b/apps/front/wraffle-webview/src/features/get-category/ui/CategoryButton.tsx index 90efe804..1e348bd6 100644 --- a/apps/front/wraffle-webview/src/features/get-category/ui/CategoryButton.tsx +++ b/apps/front/wraffle-webview/src/features/get-category/ui/CategoryButton.tsx @@ -1,7 +1,7 @@ 'use client'; import {useRouter} from 'next/navigation'; -import type {CategoryItem} from '@/entities/category/type'; +import type {CategoryItem} from '@/entities/category'; import {Typography} from '@wraffle/ui'; interface CategoryButtonProps { @@ -22,4 +22,4 @@ const CategoryButton = ({category}: CategoryButtonProps) => { ); }; -export default CategoryButton; +export {CategoryButton}; diff --git a/apps/front/wraffle-webview/src/features/get-category/ui/index.ts b/apps/front/wraffle-webview/src/features/get-category/ui/index.ts new file mode 100644 index 00000000..c714862d --- /dev/null +++ b/apps/front/wraffle-webview/src/features/get-category/ui/index.ts @@ -0,0 +1 @@ +export * from './CategoryButton'; diff --git a/apps/front/wraffle-webview/src/entities/banner/constants.ts b/apps/front/wraffle-webview/src/features/manage-raffle/config/const.ts similarity index 85% rename from apps/front/wraffle-webview/src/entities/banner/constants.ts rename to apps/front/wraffle-webview/src/features/manage-raffle/config/const.ts index 339531c9..f01cc966 100644 --- a/apps/front/wraffle-webview/src/entities/banner/constants.ts +++ b/apps/front/wraffle-webview/src/features/manage-raffle/config/const.ts @@ -1,4 +1,4 @@ -import type {RecentRaffle} from './type'; +import type {RecentRaffle} from '../model'; export const RecentRaffles: RecentRaffle = { id: 1, diff --git a/apps/front/wraffle-webview/src/features/manage-raffle/config/index.ts b/apps/front/wraffle-webview/src/features/manage-raffle/config/index.ts new file mode 100644 index 00000000..e47ea3a4 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/manage-raffle/config/index.ts @@ -0,0 +1 @@ +export * from './const'; diff --git a/apps/front/wraffle-webview/src/features/manage-raffle/model/index.ts b/apps/front/wraffle-webview/src/features/manage-raffle/model/index.ts new file mode 100644 index 00000000..4e4aa420 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/manage-raffle/model/index.ts @@ -0,0 +1,2 @@ +export * from './recent'; +export * from './recommend'; diff --git a/apps/front/wraffle-webview/src/entities/banner/type.ts b/apps/front/wraffle-webview/src/features/manage-raffle/model/recent.ts similarity index 100% rename from apps/front/wraffle-webview/src/entities/banner/type.ts rename to apps/front/wraffle-webview/src/features/manage-raffle/model/recent.ts diff --git a/apps/front/wraffle-webview/src/features/manage-raffle/model/recommend.ts b/apps/front/wraffle-webview/src/features/manage-raffle/model/recommend.ts new file mode 100644 index 00000000..a5c351e3 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/manage-raffle/model/recommend.ts @@ -0,0 +1,6 @@ +import type {Raffle, RaffleType} from '@/entities/raffle'; + +export interface RecommendRaffle extends Raffle { + type: RaffleType; + isBookmarked: boolean; +} diff --git a/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx b/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx index 19eb5515..874917dd 100644 --- a/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx +++ b/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx @@ -1,8 +1,8 @@ 'use client'; +import type {RecentRaffle} from '../model'; import Image from 'next/image'; import {useRouter} from 'next/navigation'; -import type {RecentRaffle} from '@/entities/banner/type'; import {Typography} from '@wraffle/ui'; interface BannerProps { @@ -30,4 +30,4 @@ const Banner = ({recentRaflle}: BannerProps) => { ); }; -export default Banner; +export {Banner}; diff --git a/apps/front/wraffle-webview/src/features/manage-raffle/ui/index.ts b/apps/front/wraffle-webview/src/features/manage-raffle/ui/index.ts new file mode 100644 index 00000000..bc95f09d --- /dev/null +++ b/apps/front/wraffle-webview/src/features/manage-raffle/ui/index.ts @@ -0,0 +1 @@ +export * from './Banner'; diff --git a/apps/front/wraffle-webview/src/widgets/category-list/config/const.ts b/apps/front/wraffle-webview/src/widgets/category-list/config/const.ts new file mode 100644 index 00000000..7dfc1a79 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/category-list/config/const.ts @@ -0,0 +1,76 @@ +import type {CategoryItem} from '@/entities/category'; + +export const categories: CategoryItem[] = [ + { + id: 1, + name: '패션', + parentId: null, + depth: 1, + }, + { + id: 2, + name: '가전 디지털', + parentId: null, + depth: 1, + }, + { + id: 3, + name: '전자제품', + parentId: null, + depth: 1, + }, + { + id: 4, + name: '식품', + parentId: null, + depth: 1, + }, + { + id: 5, + name: '의류', + parentId: null, + depth: 1, + }, + { + id: 6, + name: '생활', + parentId: null, + depth: 1, + }, + { + id: 11, + name: '패션', + parentId: null, + depth: 1, + }, + { + id: 12, + name: '가전 디지털', + parentId: null, + depth: 1, + }, + { + id: 13, + name: '전자 제품', + parentId: null, + depth: 1, + }, + { + id: 14, + name: '식품', + parentId: null, + depth: 1, + }, + { + id: 15, + name: '의류', + parentId: null, + depth: 1, + }, + { + id: 16, + name: '생활', + parentId: null, + depth: 1, + }, +]; diff --git a/apps/front/wraffle-webview/src/widgets/category-list/config/index.ts b/apps/front/wraffle-webview/src/widgets/category-list/config/index.ts new file mode 100644 index 00000000..e47ea3a4 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/category-list/config/index.ts @@ -0,0 +1 @@ +export * from './const'; diff --git a/apps/front/wraffle-webview/src/widgets/category-list/ui/CategoryButtons.tsx b/apps/front/wraffle-webview/src/widgets/category-list/ui/CategoryButtons.tsx index d4db1b10..c4644e1c 100644 --- a/apps/front/wraffle-webview/src/widgets/category-list/ui/CategoryButtons.tsx +++ b/apps/front/wraffle-webview/src/widgets/category-list/ui/CategoryButtons.tsx @@ -1,5 +1,5 @@ import type {CategoryItem} from '@/entities/category/type'; -import CategoryButton from '@/features/get-category/ui/CategoryButton'; +import {CategoryButton} from '@/features/get-category/ui'; interface CategoryButtonsProps { categories: CategoryItem[]; @@ -17,4 +17,4 @@ const CategoryButtons = ({categories}: CategoryButtonsProps) => { ); }; -export default CategoryButtons; +export {CategoryButtons}; diff --git a/apps/front/wraffle-webview/src/widgets/category-list/ui/index.ts b/apps/front/wraffle-webview/src/widgets/category-list/ui/index.ts new file mode 100644 index 00000000..bbe507e6 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/category-list/ui/index.ts @@ -0,0 +1 @@ +export * from './CategoryButtons'; diff --git a/apps/front/wraffle-webview/src/entities/raffle/recommend/constants.ts b/apps/front/wraffle-webview/src/widgets/recommend-list/config/const.ts similarity index 95% rename from apps/front/wraffle-webview/src/entities/raffle/recommend/constants.ts rename to apps/front/wraffle-webview/src/widgets/recommend-list/config/const.ts index 22195f59..7b3d907f 100644 --- a/apps/front/wraffle-webview/src/entities/raffle/recommend/constants.ts +++ b/apps/front/wraffle-webview/src/widgets/recommend-list/config/const.ts @@ -1,4 +1,4 @@ -import type {RecommendRaffle} from './type'; +import type {RecommendRaffle} from '@/features/manage-raffle/model'; export const recommendItems: RecommendRaffle[] = [ { diff --git a/apps/front/wraffle-webview/src/widgets/recommend-list/config/index.ts b/apps/front/wraffle-webview/src/widgets/recommend-list/config/index.ts new file mode 100644 index 00000000..e47ea3a4 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/recommend-list/config/index.ts @@ -0,0 +1 @@ +export * from './const'; diff --git a/apps/front/wraffle-webview/src/widgets/recommend-list/ui/RecommendList.tsx b/apps/front/wraffle-webview/src/widgets/recommend-list/ui/RecommendList.tsx index d5f1128d..53b23cfe 100644 --- a/apps/front/wraffle-webview/src/widgets/recommend-list/ui/RecommendList.tsx +++ b/apps/front/wraffle-webview/src/widgets/recommend-list/ui/RecommendList.tsx @@ -1,4 +1,4 @@ -import type {RecommendRaffle} from '@/entities/raffle/recommend/type'; +import type {RecommendRaffle} from '@/features/manage-raffle/model'; import {RaffleCard, Typography} from '@wraffle/ui'; interface RecommendListProps { @@ -27,4 +27,4 @@ const RecommendList = ({recommendItems}: RecommendListProps) => { ); }; -export default RecommendList; +export {RecommendList}; diff --git a/apps/front/wraffle-webview/src/widgets/recommend-list/ui/index.ts b/apps/front/wraffle-webview/src/widgets/recommend-list/ui/index.ts new file mode 100644 index 00000000..5a8eb6cb --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/recommend-list/ui/index.ts @@ -0,0 +1 @@ +export * from './RecommendList'; From dd375878b6be7a0e451a39b78d347157889bb671 Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Mon, 11 Nov 2024 03:00:32 +0900 Subject: [PATCH 19/70] =?UTF-8?q?[WRFE-55](refactor):=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8/=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=EA=B5=AC=EC=A1=B0=20=EB=A6=AC=ED=8C=A9=ED=86=A0?= =?UTF-8?q?=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/app/join/page.tsx | 9 +- .../wraffle-webview/app/login/email/page.tsx | 7 +- .../src/entities/auth/index.ts | 2 +- .../src/entities/auth/join/index.ts | 3 - .../src/entities/auth/login/schema.ts | 38 ------- .../src/entities/auth/schema.ts | 25 +++++ .../features/validate-phone/config/const.ts | 3 + .../features/validate-phone/config/index.ts | 1 + .../validate-phone/ui/RequestCode.tsx | 93 ++++++++++++++++ .../features/validate-phone/ui/VerifyCode.tsx | 32 ++++++ .../src/features/validate-phone/ui/index.ts | 2 + .../wraffle-webview/src/shared/hook/index.ts | 2 + .../src/shared/hook/useAutoFocus.ts | 2 +- .../src/shared/hook/useInput.ts | 2 +- .../src/shared/ui/form/GenericForm.tsx | 4 +- .../src/shared/ui/form/RHF/RHFInput.tsx | 7 +- .../src/shared/ui/form/index.ts | 1 + .../src/widgets/join/Phone/PhoneNumber.tsx | 105 ------------------ .../join/config/const.ts} | 0 .../type.ts => widgets/join/config/funnel.ts} | 0 .../src/widgets/join/config/index.ts | 3 + .../join => widgets/join/config}/schema.ts | 23 +--- .../src/widgets/join/{ => ui}/Extra.tsx | 8 +- .../src/widgets/join/{ => ui}/Info.tsx | 16 ++- .../src/widgets/join/{ => ui}/Name.tsx | 8 +- .../src/widgets/join/{ => ui}/Phone/Code.tsx | 20 ++-- .../join/{ => ui}/Phone/PhoneFunnel.tsx | 0 .../src/widgets/join/ui/Phone/PhoneNumber.tsx | 54 +++++++++ .../src/widgets/join/{ => ui}/Phone/index.ts | 0 .../src/widgets/join/{ => ui}/index.ts | 0 .../login => widgets/login/config}/index.ts | 0 .../src/widgets/login/config/schema.ts | 12 ++ .../src/widgets/login/{ => ui}/EmailForm.tsx | 2 +- .../src/widgets/login/ui/index.ts | 1 + packages/ui/src/ui/form/select/Select.tsx | 5 +- 35 files changed, 283 insertions(+), 207 deletions(-) delete mode 100644 apps/front/wraffle-webview/src/entities/auth/join/index.ts delete mode 100644 apps/front/wraffle-webview/src/entities/auth/login/schema.ts create mode 100644 apps/front/wraffle-webview/src/entities/auth/schema.ts create mode 100644 apps/front/wraffle-webview/src/features/validate-phone/config/const.ts create mode 100644 apps/front/wraffle-webview/src/features/validate-phone/config/index.ts create mode 100644 apps/front/wraffle-webview/src/features/validate-phone/ui/RequestCode.tsx create mode 100644 apps/front/wraffle-webview/src/features/validate-phone/ui/VerifyCode.tsx create mode 100644 apps/front/wraffle-webview/src/features/validate-phone/ui/index.ts create mode 100644 apps/front/wraffle-webview/src/shared/hook/index.ts delete mode 100644 apps/front/wraffle-webview/src/widgets/join/Phone/PhoneNumber.tsx rename apps/front/wraffle-webview/src/{entities/auth/join/constant.ts => widgets/join/config/const.ts} (100%) rename apps/front/wraffle-webview/src/{entities/auth/join/type.ts => widgets/join/config/funnel.ts} (100%) create mode 100644 apps/front/wraffle-webview/src/widgets/join/config/index.ts rename apps/front/wraffle-webview/src/{entities/auth/join => widgets/join/config}/schema.ts (78%) rename apps/front/wraffle-webview/src/widgets/join/{ => ui}/Extra.tsx (94%) rename apps/front/wraffle-webview/src/widgets/join/{ => ui}/Info.tsx (82%) rename apps/front/wraffle-webview/src/widgets/join/{ => ui}/Name.tsx (86%) rename apps/front/wraffle-webview/src/widgets/join/{ => ui}/Phone/Code.tsx (59%) rename apps/front/wraffle-webview/src/widgets/join/{ => ui}/Phone/PhoneFunnel.tsx (100%) create mode 100644 apps/front/wraffle-webview/src/widgets/join/ui/Phone/PhoneNumber.tsx rename apps/front/wraffle-webview/src/widgets/join/{ => ui}/Phone/index.ts (100%) rename apps/front/wraffle-webview/src/widgets/join/{ => ui}/index.ts (100%) rename apps/front/wraffle-webview/src/{entities/auth/login => widgets/login/config}/index.ts (100%) create mode 100644 apps/front/wraffle-webview/src/widgets/login/config/schema.ts rename apps/front/wraffle-webview/src/widgets/login/{ => ui}/EmailForm.tsx (93%) create mode 100644 apps/front/wraffle-webview/src/widgets/login/ui/index.ts diff --git a/apps/front/wraffle-webview/app/join/page.tsx b/apps/front/wraffle-webview/app/join/page.tsx index bbef24ee..a0620e4d 100644 --- a/apps/front/wraffle-webview/app/join/page.tsx +++ b/apps/front/wraffle-webview/app/join/page.tsx @@ -1,11 +1,10 @@ 'use client'; import type {z} from 'zod'; -import {joinDefaultValues, joinSchema} from '@/entities/auth/join/schema'; -import type {JoinStep} from '@/entities/auth/join/type'; -import {Header, ProgressBar} from '@/shared/ui'; -import GenericForm from '@/shared/ui/form/GenericForm'; -import {Info, Name, Extra, PhoneFunnel} from '@/widgets/join'; +import {Header, ProgressBar, GenericForm} from '@/shared/ui'; +import type {JoinStep} from '@/widgets/join/config'; +import {joinDefaultValues, joinSchema} from '@/widgets/join/config'; +import {Info, Name, Extra, PhoneFunnel} from '@/widgets/join/ui'; import {zodResolver} from '@hookform/resolvers/zod'; import {useFunnel} from '@use-funnel/browser'; diff --git a/apps/front/wraffle-webview/app/login/email/page.tsx b/apps/front/wraffle-webview/app/login/email/page.tsx index 87f65064..5c2cec49 100644 --- a/apps/front/wraffle-webview/app/login/email/page.tsx +++ b/apps/front/wraffle-webview/app/login/email/page.tsx @@ -4,10 +4,9 @@ import type {z} from 'zod'; import Image from 'next/image'; import Link from 'next/link'; import {useRouter} from 'next/navigation'; -import {loginDefaultValues, loginSchema} from '@/entities/auth'; -import {Header} from '@/shared/ui'; -import GenericForm from '@/shared/ui/form/GenericForm'; -import {EmailForm} from '@/widgets/login/EmailForm'; +import {GenericForm, Header} from '@/shared/ui'; +import {loginDefaultValues, loginSchema} from '@/widgets/login/config'; +import {EmailForm} from '@/widgets/login/ui'; import {zodResolver} from '@hookform/resolvers/zod'; import {Typography} from '@wraffle/ui'; diff --git a/apps/front/wraffle-webview/src/entities/auth/index.ts b/apps/front/wraffle-webview/src/entities/auth/index.ts index 6cc1e6e2..e27a6e2f 100644 --- a/apps/front/wraffle-webview/src/entities/auth/index.ts +++ b/apps/front/wraffle-webview/src/entities/auth/index.ts @@ -1 +1 @@ -export * from './login'; +export * from './schema'; diff --git a/apps/front/wraffle-webview/src/entities/auth/join/index.ts b/apps/front/wraffle-webview/src/entities/auth/join/index.ts deleted file mode 100644 index df92df92..00000000 --- a/apps/front/wraffle-webview/src/entities/auth/join/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './constant'; -export * from './schema'; -export * from './type'; diff --git a/apps/front/wraffle-webview/src/entities/auth/login/schema.ts b/apps/front/wraffle-webview/src/entities/auth/login/schema.ts deleted file mode 100644 index 7db81655..00000000 --- a/apps/front/wraffle-webview/src/entities/auth/login/schema.ts +++ /dev/null @@ -1,38 +0,0 @@ -import {z} from 'zod'; -import {getDefaults} from '@/shared/util'; - -const passwordSchema = z - .string() - .min(1, {message: '비밀번호를 입력해 주세요.'}) - .refine( - value => - /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~@#$!%?&])[a-zA-Z\d~@#$!%*?&]{8,}$/.test( - value, - ), - { - message: - '비밀번호는 영문, 숫자, 특수문자를 조합하여 8자 이상이어야 합니다.', - }, - ) - .default(''); - -const emailSchema = z - .string() - .min(1, {message: '이메일을 입력해 주세요.'}) - .email({message: '유효하지 않은 이메일 형식입니다.'}) - .default(''); - -export const loginSchema = z.object({ - email: emailSchema, - password: passwordSchema, -}); - -export type LoginPayload = z.infer; - -export const loginDefaultValues = getDefaults(loginSchema); - -export const passwordObjectSchema = z.object({password: passwordSchema}); -export const emailObjectSchema = z.object({email: emailSchema}); - -export type PasswordPayload = z.infer; -export type EmailPayload = z.infer; diff --git a/apps/front/wraffle-webview/src/entities/auth/schema.ts b/apps/front/wraffle-webview/src/entities/auth/schema.ts new file mode 100644 index 00000000..b70b3691 --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/auth/schema.ts @@ -0,0 +1,25 @@ +import {z} from 'zod'; + +export const passwordRegex = new RegExp( + /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~@#$!%*?&])[a-zA-Z\d~@#$!%*?&]{8,}$/, +); + +export const emailSchema = z + .string() + .min(1, {message: '이메일을 입력해 주세요.'}) + .email({message: '유효하지 않은 이메일 형식입니다.'}) + .default(''); + +export const passwordSchema = z + .string() + .regex( + passwordRegex, + '비밀번호는 영문, 숫자, 특수문자 조합으로 8자 이상 형식입니다.', + ) + .default(''); + +export const passwordObjectSchema = z.object({password: passwordSchema}); +export const emailObjectSchema = z.object({email: emailSchema}); + +export type PasswordPayload = z.infer; +export type EmailPayload = z.infer; diff --git a/apps/front/wraffle-webview/src/features/validate-phone/config/const.ts b/apps/front/wraffle-webview/src/features/validate-phone/config/const.ts new file mode 100644 index 00000000..7a61dd5a --- /dev/null +++ b/apps/front/wraffle-webview/src/features/validate-phone/config/const.ts @@ -0,0 +1,3 @@ +export const DEFAULT_ERROR_MESSAGE = ''; +export const MISMATCHED_CODE_ERROR_MESSAGE = '인증번호가 일치하지 않습니다.'; +export const VERIFY_CODE_LENGTH = 4; diff --git a/apps/front/wraffle-webview/src/features/validate-phone/config/index.ts b/apps/front/wraffle-webview/src/features/validate-phone/config/index.ts new file mode 100644 index 00000000..e47ea3a4 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/validate-phone/config/index.ts @@ -0,0 +1 @@ +export * from './const'; diff --git a/apps/front/wraffle-webview/src/features/validate-phone/ui/RequestCode.tsx b/apps/front/wraffle-webview/src/features/validate-phone/ui/RequestCode.tsx new file mode 100644 index 00000000..e66c8d99 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/validate-phone/ui/RequestCode.tsx @@ -0,0 +1,93 @@ +import type {Dispatch, SetStateAction} from 'react'; +import {useEffect, useState} from 'react'; +import type {FieldError} from 'react-hook-form'; +import {useAutoFocus, useInput} from '@/shared/hook'; +import {handleMaxLength} from '@/shared/util'; +import {InputField, Select} from '@wraffle/ui'; + +const MAX_INPUT_LENGTH = 4; + +interface RequestCodeProps { + onChangePhoneNumber: (phone: string) => void; + onChangeIsVerified: Dispatch>; + error?: FieldError; +} + +const RequestCode = ({ + onChangePhoneNumber, + onChangeIsVerified, + error, +}: RequestCodeProps) => { + const [middleInputRef, handleMiddleKeyUp] = useAutoFocus(MAX_INPUT_LENGTH); + const [lastInputRef, handleLastKeyUp] = useAutoFocus(MAX_INPUT_LENGTH); + + const [first, setFirst] = useState(''); + const [middle, handleMiddle] = useInput(''); + const [last, handleLast] = useInput(''); + const [errorMessage, setErrorMessage] = useState(''); + + const isValid = + first && + (middle.length === MAX_INPUT_LENGTH || + middle.length === MAX_INPUT_LENGTH - 1) && + last.length === MAX_INPUT_LENGTH; + + useEffect(() => { + onChangeIsVerified(false); + setErrorMessage(''); + if (isValid) { + const phoneNumber = first.concat(middle, last); + onChangePhoneNumber(phoneNumber); + // !TODO: request API + // 성공 시 onChangeIsVerified(true) + onChangeIsVerified(true); + // 실패 시 setErrorMessage에 에러메세지 + // setErrorMessage('이미 가입된 번호입니다.'); + // onChangeIsVerified(false); + } + }, [first, middle, last]); + + return ( + + 휴대폰 번호* + + {description && {description}} diff --git a/apps/front/wraffle-webview/src/shared/ui/form/index.ts b/apps/front/wraffle-webview/src/shared/ui/form/index.ts index 3cf925c2..c110bb7e 100644 --- a/apps/front/wraffle-webview/src/shared/ui/form/index.ts +++ b/apps/front/wraffle-webview/src/shared/ui/form/index.ts @@ -1,2 +1,3 @@ export * from './RHF/RHFInput'; export * from './RHF/core/Form'; +export * from './GenericForm'; diff --git a/apps/front/wraffle-webview/src/widgets/join/Phone/PhoneNumber.tsx b/apps/front/wraffle-webview/src/widgets/join/Phone/PhoneNumber.tsx deleted file mode 100644 index edfc5b24..00000000 --- a/apps/front/wraffle-webview/src/widgets/join/Phone/PhoneNumber.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import {useEffect, useState} from 'react'; -import {useFormContext} from 'react-hook-form'; -import type {JoinPayload} from '@/entities/auth/join/schema'; -import useAutoFocus from '@/shared/hook/useAutoFocus'; -import useInput from '@/shared/hook/useInput'; -import {handleMaxLength} from '@/shared/util'; -import {Button, InputField, Select, Typography} from '@wraffle/ui'; - -const MAX_INPUT_LENGTH = 4; - -interface PhoneNumberProps { - onNext(phoneNumber: string): void; -} - -const PhoneNumber = ({onNext}: PhoneNumberProps) => { - const { - formState: {errors}, - setValue, - getValues, - trigger, - } = useFormContext(); - - const [middleInputRef, handleMiddleKeyUp] = useAutoFocus(MAX_INPUT_LENGTH); - const [lastInputRef, handleLastKeyUp] = useAutoFocus(MAX_INPUT_LENGTH); - - const [first, setFirst] = useState(''); - const [middle, handleMiddle] = useInput(''); - const [last, handleLast] = useInput(''); - - const isValid = - first && - (middle.length === MAX_INPUT_LENGTH || - middle.length === MAX_INPUT_LENGTH - 1) && - last.length === MAX_INPUT_LENGTH; - - useEffect(() => { - if (isValid) { - setValue('phoneNumber', first.concat(middle, last)); - trigger('phoneNumber'); - } - }, [first, middle, last]); - - return ( -
-
- - 휴대폰 인증을 진행할게요! - - - 휴대폰 정보를 입력해주세요. - -
- - - 휴대폰 번호* - +
diff --git a/apps/front/wraffle-webview/src/widgets/join/Phone/PhoneFunnel.tsx b/apps/front/wraffle-webview/src/widgets/join/ui/Phone/PhoneFunnel.tsx similarity index 100% rename from apps/front/wraffle-webview/src/widgets/join/Phone/PhoneFunnel.tsx rename to apps/front/wraffle-webview/src/widgets/join/ui/Phone/PhoneFunnel.tsx diff --git a/apps/front/wraffle-webview/src/widgets/join/ui/Phone/PhoneNumber.tsx b/apps/front/wraffle-webview/src/widgets/join/ui/Phone/PhoneNumber.tsx new file mode 100644 index 00000000..b4d39f27 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/join/ui/Phone/PhoneNumber.tsx @@ -0,0 +1,54 @@ +import type {JoinPayload} from '../../config'; +import {useState} from 'react'; +import {useFormContext} from 'react-hook-form'; +import {RequestCode} from '@/features/validate-phone/ui/RequestCode'; +import {Button, Typography} from '@wraffle/ui'; + +interface PhoneNumberProps { + onNext(phoneNumber: string): void; +} + +const PhoneNumber = ({onNext}: PhoneNumberProps) => { + const { + formState: {errors}, + setValue, + getValues, + } = useFormContext(); + + const [isVerified, handleIsVerified] = useState(false); + + const handlePhoneNumber = (phone: string) => { + setValue('phoneNumber', phone, {shouldValidate: true}); + }; + + return ( +
+
+ + 휴대폰 인증을 진행할게요! + + + 휴대폰 정보를 입력해주세요. + +
+ + + +
+ +
+
+ ); +}; + +export default PhoneNumber; diff --git a/apps/front/wraffle-webview/src/widgets/join/Phone/index.ts b/apps/front/wraffle-webview/src/widgets/join/ui/Phone/index.ts similarity index 100% rename from apps/front/wraffle-webview/src/widgets/join/Phone/index.ts rename to apps/front/wraffle-webview/src/widgets/join/ui/Phone/index.ts diff --git a/apps/front/wraffle-webview/src/widgets/join/index.ts b/apps/front/wraffle-webview/src/widgets/join/ui/index.ts similarity index 100% rename from apps/front/wraffle-webview/src/widgets/join/index.ts rename to apps/front/wraffle-webview/src/widgets/join/ui/index.ts diff --git a/apps/front/wraffle-webview/src/entities/auth/login/index.ts b/apps/front/wraffle-webview/src/widgets/login/config/index.ts similarity index 100% rename from apps/front/wraffle-webview/src/entities/auth/login/index.ts rename to apps/front/wraffle-webview/src/widgets/login/config/index.ts diff --git a/apps/front/wraffle-webview/src/widgets/login/config/schema.ts b/apps/front/wraffle-webview/src/widgets/login/config/schema.ts new file mode 100644 index 00000000..283f7c77 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/login/config/schema.ts @@ -0,0 +1,12 @@ +import {z} from 'zod'; +import {emailSchema, passwordSchema} from '@/entities/auth/schema'; +import {getDefaults} from '@/shared/util'; + +export const loginSchema = z.object({ + email: emailSchema, + password: passwordSchema, +}); + +export type LoginPayload = z.infer; + +export const loginDefaultValues = getDefaults(loginSchema); diff --git a/apps/front/wraffle-webview/src/widgets/login/EmailForm.tsx b/apps/front/wraffle-webview/src/widgets/login/ui/EmailForm.tsx similarity index 93% rename from apps/front/wraffle-webview/src/widgets/login/EmailForm.tsx rename to apps/front/wraffle-webview/src/widgets/login/ui/EmailForm.tsx index ad2b2ed9..448b9c87 100644 --- a/apps/front/wraffle-webview/src/widgets/login/EmailForm.tsx +++ b/apps/front/wraffle-webview/src/widgets/login/ui/EmailForm.tsx @@ -1,5 +1,5 @@ +import type {LoginPayload} from '../config/schema'; import {useFormContext} from 'react-hook-form'; -import type {LoginPayload} from '@/entities/auth'; import {RHFInput} from '@/shared/ui'; import {Button, Typography} from '@wraffle/ui'; diff --git a/apps/front/wraffle-webview/src/widgets/login/ui/index.ts b/apps/front/wraffle-webview/src/widgets/login/ui/index.ts new file mode 100644 index 00000000..ce11aad2 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/login/ui/index.ts @@ -0,0 +1 @@ +export * from './EmailForm'; diff --git a/packages/ui/src/ui/form/select/Select.tsx b/packages/ui/src/ui/form/select/Select.tsx index 5442e22a..03729831 100644 --- a/packages/ui/src/ui/form/select/Select.tsx +++ b/packages/ui/src/ui/form/select/Select.tsx @@ -7,6 +7,7 @@ import { SelectTrigger, SelectValue, } from './PrimitiveSelect'; +import {cn} from '@wds/shared/utils'; export interface SelectItem { value: string; @@ -19,7 +20,7 @@ export interface GroupSelectItem { } export interface BaseSelectProps { - className: string; + className?: string; placeholder: string; onValueChange: (value: string) => void; defaultValue?: string; @@ -50,7 +51,7 @@ const Select = ({ }: SelectProps) => { return ( - + From 4c593613b48e45bfb47cf01afbdc3edc864d2a0e Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Mon, 11 Nov 2024 03:00:47 +0900 Subject: [PATCH 20/70] =?UTF-8?q?[WRFE-55](refactor):=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=EB=90=9C=20=ED=8F=B4=EB=8D=94=EA=B5=AC=EC=A1=B0=EB=A1=9C=20Imp?= =?UTF-8?q?ort=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wraffle-webview/app/password/find/page.tsx | 13 +++++-------- .../wraffle-webview/app/password/reset/page.tsx | 13 +++++-------- .../wraffle-webview/app/password/sent/page.tsx | 3 +-- .../app/products/create/event/page.tsx | 7 +++---- .../app/products/create/raffle/page.tsx | 5 ++--- .../src/features/password/api/index.ts | 1 + .../src/shared/ui/bottom/BottomFixedBox.tsx | 2 +- .../wraffle-webview/src/shared/ui/bottom/index.ts | 1 + apps/front/wraffle-webview/src/shared/ui/index.ts | 1 + 9 files changed, 20 insertions(+), 26 deletions(-) create mode 100644 apps/front/wraffle-webview/src/features/password/api/index.ts create mode 100644 apps/front/wraffle-webview/src/shared/ui/bottom/index.ts diff --git a/apps/front/wraffle-webview/app/password/find/page.tsx b/apps/front/wraffle-webview/app/password/find/page.tsx index 2864dcf1..ae0333be 100644 --- a/apps/front/wraffle-webview/app/password/find/page.tsx +++ b/apps/front/wraffle-webview/app/password/find/page.tsx @@ -2,11 +2,10 @@ import {useRouter} from 'next/navigation'; import {useForm} from 'react-hook-form'; -import {type EmailPayload, emailObjectSchema} from '@/entities/auth'; -import {useSendEmail} from '@/features/password/api/password'; -import {Form, RHFInput} from '@/shared/ui'; -import {Header} from '@/shared/ui'; -import BottomFixedBox from '@/shared/ui/bottom/BottomFixedBox'; +import type {EmailPayload} from '@/entities/auth'; +import {emailObjectSchema} from '@/entities/auth'; +import {useSendEmail} from '@/features/password/api'; +import {BottomFixedBox, Form, Header, RHFInput} from '@/shared/ui'; import {getDefaults} from '@/shared/util'; import {zodResolver} from '@hookform/resolvers/zod'; import {Button, Toaster, Typography, useToast} from '@wraffle/ui'; @@ -82,9 +81,7 @@ const FindPasswordPage = () => {
- + diff --git a/apps/front/wraffle-webview/app/password/reset/page.tsx b/apps/front/wraffle-webview/app/password/reset/page.tsx index ae9e6053..ddb35be6 100644 --- a/apps/front/wraffle-webview/app/password/reset/page.tsx +++ b/apps/front/wraffle-webview/app/password/reset/page.tsx @@ -2,11 +2,10 @@ import {useRouter, useSearchParams} from 'next/navigation'; import {useForm} from 'react-hook-form'; -import {type PasswordPayload, passwordObjectSchema} from '@/entities/auth'; -import {useResetPassword} from '@/features/password/api/password'; -import {Form, RHFInput} from '@/shared/ui'; -import {Header} from '@/shared/ui'; -import BottomFixedBox from '@/shared/ui/bottom/BottomFixedBox'; +import type {PasswordPayload} from '@/entities/auth'; +import {passwordObjectSchema} from '@/entities/auth'; +import {useResetPassword} from '@/features/password/api'; +import {BottomFixedBox, Form, Header, RHFInput} from '@/shared/ui'; import {getDefaults} from '@/shared/util'; import {zodResolver} from '@hookform/resolvers/zod'; import {Button, Toaster, Typography, useToast} from '@wraffle/ui'; @@ -82,9 +81,7 @@ const ResetPasswordPage = () => {
- + diff --git a/apps/front/wraffle-webview/app/password/sent/page.tsx b/apps/front/wraffle-webview/app/password/sent/page.tsx index 0a7e2e8a..9cd44c51 100644 --- a/apps/front/wraffle-webview/app/password/sent/page.tsx +++ b/apps/front/wraffle-webview/app/password/sent/page.tsx @@ -1,8 +1,7 @@ 'use client'; import {useRouter} from 'next/navigation'; -import {Header} from '@/shared/ui'; -import BottomFixedBox from '@/shared/ui/bottom/BottomFixedBox'; +import {BottomFixedBox, Header} from '@/shared/ui'; import {Button, Typography} from '@wraffle/ui'; const SendEmailSuccessPage = () => { diff --git a/apps/front/wraffle-webview/app/products/create/event/page.tsx b/apps/front/wraffle-webview/app/products/create/event/page.tsx index 851ae2b1..64a3a465 100644 --- a/apps/front/wraffle-webview/app/products/create/event/page.tsx +++ b/apps/front/wraffle-webview/app/products/create/event/page.tsx @@ -5,15 +5,14 @@ import { createEventDefaultValues, createEventSchema, } from '@/entities/product/model'; -import {Header, ProgressBar} from '@/shared/ui'; -import GenericForm from '@/shared/ui/form/GenericForm'; +import {GenericForm, Header, ProgressBar} from '@/shared/ui'; import { DateStep, - ImageStep, EtcStep, - TitleStep, + ImageStep, ProductList, SuccessList, + TitleStep, } from '@/widgets/product-list/create/ui'; import {zodResolver} from '@hookform/resolvers/zod'; import {createFunnelSteps, useFunnel} from '@use-funnel/browser'; diff --git a/apps/front/wraffle-webview/app/products/create/raffle/page.tsx b/apps/front/wraffle-webview/app/products/create/raffle/page.tsx index 6dde3a1e..c48be9de 100644 --- a/apps/front/wraffle-webview/app/products/create/raffle/page.tsx +++ b/apps/front/wraffle-webview/app/products/create/raffle/page.tsx @@ -1,12 +1,11 @@ 'use client'; -import type {RaffleCreateState} from '@/entities/product/model'; import { createRaffleDefaultValues, createRaffleSchema, + type RaffleCreateState, } from '@/entities/product/model'; -import {Header, ProgressBar} from '@/shared/ui'; -import GenericForm from '@/shared/ui/form/GenericForm'; +import {GenericForm, Header, ProgressBar} from '@/shared/ui'; import { DateStep, EtcStep, diff --git a/apps/front/wraffle-webview/src/features/password/api/index.ts b/apps/front/wraffle-webview/src/features/password/api/index.ts new file mode 100644 index 00000000..47b7e7a2 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/password/api/index.ts @@ -0,0 +1 @@ +export * from './password'; diff --git a/apps/front/wraffle-webview/src/shared/ui/bottom/BottomFixedBox.tsx b/apps/front/wraffle-webview/src/shared/ui/bottom/BottomFixedBox.tsx index 4fa27606..bc5bd9bd 100644 --- a/apps/front/wraffle-webview/src/shared/ui/bottom/BottomFixedBox.tsx +++ b/apps/front/wraffle-webview/src/shared/ui/bottom/BottomFixedBox.tsx @@ -18,4 +18,4 @@ function BottomFixedBox({children, className}: BottomFixedBoxProps) { ); } -export default BottomFixedBox; +export {BottomFixedBox}; diff --git a/apps/front/wraffle-webview/src/shared/ui/bottom/index.ts b/apps/front/wraffle-webview/src/shared/ui/bottom/index.ts new file mode 100644 index 00000000..c7476c48 --- /dev/null +++ b/apps/front/wraffle-webview/src/shared/ui/bottom/index.ts @@ -0,0 +1 @@ +export * from './BottomFixedBox'; diff --git a/apps/front/wraffle-webview/src/shared/ui/index.ts b/apps/front/wraffle-webview/src/shared/ui/index.ts index c9b46e45..2323d3d0 100644 --- a/apps/front/wraffle-webview/src/shared/ui/index.ts +++ b/apps/front/wraffle-webview/src/shared/ui/index.ts @@ -1,3 +1,4 @@ +export * from './bottom'; export * from './form'; export * from './header/Header'; export * from './progress/Progress'; From 3533bb0fd7555029ac193dd48752cc1625633082 Mon Sep 17 00:00:00 2001 From: sangminlee98 Date: Mon, 11 Nov 2024 15:02:15 +0900 Subject: [PATCH 21/70] =?UTF-8?q?[WRFE-55](fix):=20=EC=98=A4=ED=83=88?= =?UTF-8?q?=EC=9E=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/front/wraffle-webview/app/page.tsx | 2 +- .../src/features/manage-raffle/ui/Banner.tsx | 6 +++--- .../wraffle-webview/src/widgets/login/ui/EmailForm.tsx | 10 ++-------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/apps/front/wraffle-webview/app/page.tsx b/apps/front/wraffle-webview/app/page.tsx index 9480af9c..5da988bd 100644 --- a/apps/front/wraffle-webview/app/page.tsx +++ b/apps/front/wraffle-webview/app/page.tsx @@ -19,7 +19,7 @@ export default function Home() {
- +
diff --git a/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx b/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx index 874917dd..0319ae79 100644 --- a/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx +++ b/apps/front/wraffle-webview/src/features/manage-raffle/ui/Banner.tsx @@ -6,11 +6,11 @@ import {useRouter} from 'next/navigation'; import {Typography} from '@wraffle/ui'; interface BannerProps { - recentRaflle: RecentRaffle; + recentRaffle: RecentRaffle; } -const Banner = ({recentRaflle}: BannerProps) => { - const {id, title, subTitle, imageUrl, toGoUrl} = recentRaflle; +const Banner = ({recentRaffle}: BannerProps) => { + const {id, title, subTitle, imageUrl, toGoUrl} = recentRaffle; const router = useRouter(); return (
{ label='비밀번호*' placeholder='비밀번호를 입력해주세요.' /> - ); From ed0dee52ef820c472f700cc4e65fd1f9e4a95a1b Mon Sep 17 00:00:00 2001 From: ajeong Date: Wed, 28 Aug 2024 23:12:40 +0900 Subject: [PATCH 22/70] =?UTF-8?q?[WRFE-10](feat):=20products=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/products/[productId]/layout.tsx | 12 +++++++ .../app/products/[productId]/page.tsx | 28 +++++++++++++++++ apps/front/wraffle-webview/tsconfig.json | 31 ++++++++++++++----- 3 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 apps/front/wraffle-webview/app/products/[productId]/layout.tsx create mode 100644 apps/front/wraffle-webview/app/products/[productId]/page.tsx diff --git a/apps/front/wraffle-webview/app/products/[productId]/layout.tsx b/apps/front/wraffle-webview/app/products/[productId]/layout.tsx new file mode 100644 index 00000000..334ff646 --- /dev/null +++ b/apps/front/wraffle-webview/app/products/[productId]/layout.tsx @@ -0,0 +1,12 @@ +import type {ReactNode} from 'react'; + +type Props = {children: ReactNode}; +export default function Layout({children}: Props) { + return ( + <> +
+
+ {children} + + ); +} diff --git a/apps/front/wraffle-webview/app/products/[productId]/page.tsx b/apps/front/wraffle-webview/app/products/[productId]/page.tsx new file mode 100644 index 00000000..3f6ba9bf --- /dev/null +++ b/apps/front/wraffle-webview/app/products/[productId]/page.tsx @@ -0,0 +1,28 @@ +import {Tag} from '../../../../../../packages/ui/src/ui/tag/Tag'; + +export default function Product() { + return ( +
+
+
+
+ Vans + 래플 +
+

[Vans] 올드스쿨

+

78,000

+
+

응모 기간

+
6월 1일 23:59:59 ~ 6월 7일 00:00:00
+
+

당첨자 발표

+
6월 11일 오후 5시 00분
+
+

유의사항

+
-제작 박스로 준비해드립니다
+
오후 3시 이전 결제 완료 시 택배 출고 드립니다
+
당일 상품 출고 마감 시간 3시입니다
+
+
+ ); +} diff --git a/apps/front/wraffle-webview/tsconfig.json b/apps/front/wraffle-webview/tsconfig.json index 91fb55c0..18efeea1 100644 --- a/apps/front/wraffle-webview/tsconfig.json +++ b/apps/front/wraffle-webview/tsconfig.json @@ -8,15 +8,28 @@ ], "baseUrl": ".", "paths": { - "@/app/*": ["./src/app/*"], - "@/pages/*": ["./src/pages/*"], - "@/shared/*": ["./src/shared/*"], - "@/widgets/*": ["./src/widgets/*"], - "@/features/*": ["./src/features/*"], - "@/entities/*": ["./src/entities/*"] + "@/app/*": [ + "./src/app/*" + ], + "@/pages/*": [ + "./src/pages/*" + ], + "@/shared/*": [ + "./src/shared/*" + ], + "@/widgets/*": [ + "./src/widgets/*" + ], + "@/features/*": [ + "./src/features/*" + ], + "@/entities/*": [ + "./src/entities/*" + ] }, "incremental": true, - "noEmit": true + "noEmit": true, + "strictNullChecks": true }, "include": [ "next-env.d.ts", @@ -25,5 +38,7 @@ ".next/types/**/*.ts", "postcss.config.js" ], - "exclude": ["node_modules"] + "exclude": [ + "node_modules" + ] } From ce943528e3455d52fee56034b03ddaa8ceca9464 Mon Sep 17 00:00:00 2001 From: ajeong Date: Sat, 31 Aug 2024 05:30:36 +0900 Subject: [PATCH 23/70] =?UTF-8?q?[WRFE-10](feat):=20=EB=9E=98=ED=94=8C=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/products/[productId]/layout.tsx | 16 +-- .../app/products/[productId]/page.tsx | 29 +--- .../src/pages/products/[productId]/layout.tsx | 12 ++ .../src/pages/products/[productId]/page.tsx | 132 ++++++++++++++++++ 4 files changed, 153 insertions(+), 36 deletions(-) create mode 100644 apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx create mode 100644 apps/front/wraffle-webview/src/pages/products/[productId]/page.tsx diff --git a/apps/front/wraffle-webview/app/products/[productId]/layout.tsx b/apps/front/wraffle-webview/app/products/[productId]/layout.tsx index 334ff646..cdb490ad 100644 --- a/apps/front/wraffle-webview/app/products/[productId]/layout.tsx +++ b/apps/front/wraffle-webview/app/products/[productId]/layout.tsx @@ -1,12 +1,10 @@ import type {ReactNode} from 'react'; +import ProductLayout from '@/pages/products/[productId]/layout'; -type Props = {children: ReactNode}; -export default function Layout({children}: Props) { - return ( - <> -
-
- {children} - - ); +interface LayoutProps { + children: ReactNode; +} + +export default function RootLayout({children}: LayoutProps) { + return {children}; } diff --git a/apps/front/wraffle-webview/app/products/[productId]/page.tsx b/apps/front/wraffle-webview/app/products/[productId]/page.tsx index 3f6ba9bf..81d5ccec 100644 --- a/apps/front/wraffle-webview/app/products/[productId]/page.tsx +++ b/apps/front/wraffle-webview/app/products/[productId]/page.tsx @@ -1,28 +1,3 @@ -import {Tag} from '../../../../../../packages/ui/src/ui/tag/Tag'; +import ProductPage from '@/pages/products/[productId]/page'; -export default function Product() { - return ( -
-
-
-
- Vans - 래플 -
-

[Vans] 올드스쿨

-

78,000

-
-

응모 기간

-
6월 1일 23:59:59 ~ 6월 7일 00:00:00
-
-

당첨자 발표

-
6월 11일 오후 5시 00분
-
-

유의사항

-
-제작 박스로 준비해드립니다
-
오후 3시 이전 결제 완료 시 택배 출고 드립니다
-
당일 상품 출고 마감 시간 3시입니다
-
-
- ); -} +export default ProductPage; diff --git a/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx b/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx new file mode 100644 index 00000000..334ff646 --- /dev/null +++ b/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx @@ -0,0 +1,12 @@ +import type {ReactNode} from 'react'; + +type Props = {children: ReactNode}; +export default function Layout({children}: Props) { + return ( + <> +
+
+ {children} + + ); +} diff --git a/apps/front/wraffle-webview/src/pages/products/[productId]/page.tsx b/apps/front/wraffle-webview/src/pages/products/[productId]/page.tsx new file mode 100644 index 00000000..3edb1479 --- /dev/null +++ b/apps/front/wraffle-webview/src/pages/products/[productId]/page.tsx @@ -0,0 +1,132 @@ +'use client'; + +import Image from 'next/image'; +import {useState, useEffect} from 'react'; +import {Tag} from '@wraffle/ui/src/ui/tag/Tag'; + +interface ProductData { + id: number; + title: string; + price: number; + startDate: string; + endDate: string; + announceAt: string; + description: string; + etc: string; + thumbnail: string; + clipCount: number; + status: string; + applyCount: number; + createUserId: number; + categoryId: number; + tags: string[]; + images: string[]; +} + +const sampleData: ProductData = { + id: 1, + title: '[Vans] 올드스쿨', + price: 78000, + startDate: '2024-07-31 23:20:59', + endDate: '2024-08-02 23:20:59', + announceAt: '2024-08-03 23:00:00', + description: + '제작 박스로 준비해드립니다. 오후 3시 이전 결제 완료 시 택배 출고 드립니다. 당일 상품 출고 마감 시간 3시입니다.', + etc: '유의사항', + thumbnail: + 'https://github.com/user-attachments/assets/73684618-8305-4a78-bcd6-e36342b46c22', + clipCount: 24, + status: 'WAITING', // WAITING(추첨 전), APPROVED(당첨), REJECTED(미당첨) + applyCount: 20, + createUserId: 1, + categoryId: 3, + tags: ['Vans', '래플'], + images: [ + 'https://github.com/user-attachments/assets/73684618-8305-4a78-bcd6-e36342b46c22', + 'https://github.com/user-attachments/assets/4a104905-0106-4b8a-8dcd-06926162e2e6', + ], +}; + +function formatDate(dateString: string) { + const date = new Date(dateString); + const month = date.getMonth() + 1; + const day = date.getDate(); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + const seconds = date.getSeconds().toString().padStart(2, '0'); + + return `${month}월 ${day}일 ${hours}:${minutes}:${seconds}`; +} + +export default function Product() { + const [productData, setProductData] = useState(null); + + useEffect(() => { + setProductData(sampleData); + }, []); + + if (!productData) { + return
Loading...
; + } + + return ( +
+
+ Product Images +
+
+ {/* Tag와 Title, Price */} +
+
+ {productData.tags.map((tag, index) => ( + {tag} + ))} +
+
+

{productData.title}

+

+ {productData.price.toLocaleString()}원 +

+
+
+ +
+ + {/* 응모 기간과 날짜 */} +
+

응모 기간

+

+ {formatDate(productData.startDate)} ~{' '} + {formatDate(productData.endDate)} +

+
+ +
+ + {/* 당첨자 발표와 날짜 */} +
+

당첨자 발표

+

+ {formatDate(productData.announceAt)} +

+
+ +
+ + {/* 유의사항과 Description */} +
+

유의사항

+

{productData.description}

+
+
+
+ ); +} From a46083cbba0ace33cc58e02e0a26d0b518d1a0a3 Mon Sep 17 00:00:00 2001 From: ajeong Date: Wed, 28 Aug 2024 23:12:40 +0900 Subject: [PATCH 24/70] =?UTF-8?q?[WRFE-10](feat):=20products=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/products/[productId]/page.tsx | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/apps/front/wraffle-webview/app/products/[productId]/page.tsx b/apps/front/wraffle-webview/app/products/[productId]/page.tsx index 81d5ccec..17db0e9a 100644 --- a/apps/front/wraffle-webview/app/products/[productId]/page.tsx +++ b/apps/front/wraffle-webview/app/products/[productId]/page.tsx @@ -1,3 +1,28 @@ -import ProductPage from '@/pages/products/[productId]/page'; +import {Tag} from '../../../../../../packages/ui/src/ui/tag/Tag'; -export default ProductPage; +export default function Product() { + return ( +
+
+
+
+ Vans + 래플 +
+

[Vans] 올드스쿨

+

78,000

+
+

응모 기간

+
6월 1일 23:59:59 ~ 6월 7일 00:00:00
+
+

당첨자 발표

+
6월 11일 오후 5시 00분
+
+

유의사항

+
-제작 박스로 준비해드립니다
+
오후 3시 이전 결제 완료 시 택배 출고 드립니다
+
당일 상품 출고 마감 시간 3시입니다
+
+
+ ); +} From 90ccb20b5d1128a36333f1a38312f828a000803d Mon Sep 17 00:00:00 2001 From: ajeong Date: Sat, 31 Aug 2024 05:30:36 +0900 Subject: [PATCH 25/70] =?UTF-8?q?[WRFE-10](feat):=20=EB=9E=98=ED=94=8C=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/products/[productId]/page.tsx | 29 ++----------------- apps/front/wraffle-webview/next.config.mjs | 1 + 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/apps/front/wraffle-webview/app/products/[productId]/page.tsx b/apps/front/wraffle-webview/app/products/[productId]/page.tsx index 17db0e9a..81d5ccec 100644 --- a/apps/front/wraffle-webview/app/products/[productId]/page.tsx +++ b/apps/front/wraffle-webview/app/products/[productId]/page.tsx @@ -1,28 +1,3 @@ -import {Tag} from '../../../../../../packages/ui/src/ui/tag/Tag'; +import ProductPage from '@/pages/products/[productId]/page'; -export default function Product() { - return ( -
-
-
-
- Vans - 래플 -
-

[Vans] 올드스쿨

-

78,000

-
-

응모 기간

-
6월 1일 23:59:59 ~ 6월 7일 00:00:00
-
-

당첨자 발표

-
6월 11일 오후 5시 00분
-
-

유의사항

-
-제작 박스로 준비해드립니다
-
오후 3시 이전 결제 완료 시 택배 출고 드립니다
-
당일 상품 출고 마감 시간 3시입니다
-
-
- ); -} +export default ProductPage; diff --git a/apps/front/wraffle-webview/next.config.mjs b/apps/front/wraffle-webview/next.config.mjs index a963db40..5b52b804 100644 --- a/apps/front/wraffle-webview/next.config.mjs +++ b/apps/front/wraffle-webview/next.config.mjs @@ -16,6 +16,7 @@ const nextConfig = { '../../../packages/ui/src/widgets', ), }; + return config; }, experimental: { From 8c514be210b61803de05ff01c644b5dd448e6eee Mon Sep 17 00:00:00 2001 From: ajeong Date: Sat, 31 Aug 2024 06:26:23 +0900 Subject: [PATCH 26/70] =?UTF-8?q?[WRFE-10](feat):=20ProductInfoMenu=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/products/[productId]/layout.tsx | 22 +++++++++--- .../widgets/product-info/ProductInfoMenu.tsx | 35 +++++++++++++++++++ .../src/widgets/product-info/index.ts | 1 + 3 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 apps/front/wraffle-webview/src/widgets/product-info/ProductInfoMenu.tsx create mode 100644 apps/front/wraffle-webview/src/widgets/product-info/index.ts diff --git a/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx b/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx index 334ff646..b0f38030 100644 --- a/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx +++ b/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx @@ -1,12 +1,26 @@ +'use client'; + import type {ReactNode} from 'react'; +import React from 'react'; +import {ProductInfoMenu} from '@/widgets/product-info'; + +type Props = { + children: ReactNode; +}; -type Props = {children: ReactNode}; export default function Layout({children}: Props) { + const [selectedMenu, setSelectedMenu] = React.useState('상품'); // 선택된 메뉴 상태 관리 + return ( <> -
-
- {children} +
+ + + +
{children}
); } diff --git a/apps/front/wraffle-webview/src/widgets/product-info/ProductInfoMenu.tsx b/apps/front/wraffle-webview/src/widgets/product-info/ProductInfoMenu.tsx new file mode 100644 index 00000000..09d0d475 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/product-info/ProductInfoMenu.tsx @@ -0,0 +1,35 @@ +'use client'; + +interface ProductInfoMenuProps { + selectedMenu: string; + onSelectMenu: (menu: string) => void; +} + +const menus = ['상품', '응모 기간', '당첨자 발표', '유의사항']; + +export default function ProductInfoMenu({ + selectedMenu, + onSelectMenu, +}: ProductInfoMenuProps) { + return ( + + ); +} diff --git a/apps/front/wraffle-webview/src/widgets/product-info/index.ts b/apps/front/wraffle-webview/src/widgets/product-info/index.ts new file mode 100644 index 00000000..2caa2214 --- /dev/null +++ b/apps/front/wraffle-webview/src/widgets/product-info/index.ts @@ -0,0 +1 @@ +export {default as ProductInfoMenu} from './ProductInfoMenu'; From 55b9c772e1b403a8e839cd0a11c405ead8b1844b Mon Sep 17 00:00:00 2001 From: ajeong Date: Tue, 10 Sep 2024 23:54:57 +0900 Subject: [PATCH 27/70] =?UTF-8?q?[WRFE-10](refactor):=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD(page=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=20=EC=A0=9C=EA=B1=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/products/[productId]/layout.tsx | 16 ++- .../app/products/[productId]/page.tsx | 102 +++++++++++++- .../src/entities/product/product.ts | 47 +++++++ .../src/features/product-menu/useMenu.ts | 16 +++ .../src/pages/products/[productId]/layout.tsx | 26 ---- .../src/pages/products/[productId]/page.tsx | 132 ------------------ .../widgets/product-info/ProductInfoMenu.tsx | 12 +- 7 files changed, 181 insertions(+), 170 deletions(-) create mode 100644 apps/front/wraffle-webview/src/entities/product/product.ts create mode 100644 apps/front/wraffle-webview/src/features/product-menu/useMenu.ts delete mode 100644 apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx delete mode 100644 apps/front/wraffle-webview/src/pages/products/[productId]/page.tsx diff --git a/apps/front/wraffle-webview/app/products/[productId]/layout.tsx b/apps/front/wraffle-webview/app/products/[productId]/layout.tsx index cdb490ad..9e60f607 100644 --- a/apps/front/wraffle-webview/app/products/[productId]/layout.tsx +++ b/apps/front/wraffle-webview/app/products/[productId]/layout.tsx @@ -1,10 +1,16 @@ +'use client'; + import type {ReactNode} from 'react'; -import ProductLayout from '@/pages/products/[productId]/layout'; +import React from 'react'; -interface LayoutProps { +type Props = { children: ReactNode; -} +}; -export default function RootLayout({children}: LayoutProps) { - return {children}; +export default function Layout({children}: Props) { + return ( + <> +
{children}
+ + ); } diff --git a/apps/front/wraffle-webview/app/products/[productId]/page.tsx b/apps/front/wraffle-webview/app/products/[productId]/page.tsx index 81d5ccec..4aa36f59 100644 --- a/apps/front/wraffle-webview/app/products/[productId]/page.tsx +++ b/apps/front/wraffle-webview/app/products/[productId]/page.tsx @@ -1,3 +1,101 @@ -import ProductPage from '@/pages/products/[productId]/page'; +'use client'; -export default ProductPage; +import Image from 'next/image'; +import {useEffect, useState} from 'react'; +import {sampleProductData} from '@/entities/product/product'; +import type {ProductData} from '@/entities/product/product'; +import {useMenu} from '@/features/product-menu/useMenu'; +import ProductInfoMenu from '@/widgets/product-info/ProductInfoMenu'; +import {Tag} from '@wraffle/ui/src/ui/tag/Tag'; + +function formatDate(dateString: string) { + const date = new Date(dateString); + const month = date.getMonth() + 1; + const day = date.getDate(); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + const seconds = date.getSeconds().toString().padStart(2, '0'); + + return `${month}월 ${day}일 ${hours}:${minutes}:${seconds}`; +} + +export default function ProductPage() { + const {selectedMenu, selectMenu} = useMenu('상품'); + const [productData, setProductData] = useState(null); + + useEffect(() => { + setProductData(sampleProductData); + }, []); + + if (!productData) { + return
Loading...
; + } + + return ( + <> +
+
+ +
+ +
+
+ Product Images +
+ {/* Tag와 Title, Price */} +
+
+ {productData.tags.map(tag => ( + {tag.name} + ))} +
+
+

{productData.title}

+

+ {productData.price.toLocaleString()}원 +

+
+
+
+
+ +
+ +
+

응모 기간

+

+ {formatDate(productData.startDate)} ~{' '} + {formatDate(productData.endDate)} +

+
+ +
+ +
+

당첨자 발표

+

+ {formatDate(productData.announceAt)} +

+
+ +
+ +
+

유의사항

+

{productData.description}

+
+
+ + ); +} diff --git a/apps/front/wraffle-webview/src/entities/product/product.ts b/apps/front/wraffle-webview/src/entities/product/product.ts new file mode 100644 index 00000000..3cb89008 --- /dev/null +++ b/apps/front/wraffle-webview/src/entities/product/product.ts @@ -0,0 +1,47 @@ +export interface ProductTag { + id: string; + name: string; +} + +export interface ProductData { + id: string; + title: string; + price: number; + startDate: string; + endDate: string; + announceAt: string; + description: string; + etc: string; + clipCount: number; + status: string; + applyCount: number; + createUserId: number; + type: string; + tags: ProductTag[]; + images: string[]; +} + +export const sampleProductData: ProductData = { + id: '1', + title: '[Vans] 올드스쿨', + price: 78000, + startDate: '2024-07-31T00:00:00.000Z', + endDate: '2024-08-02T00:00:00.000Z', + announceAt: '2024-08-03T00:00:00.000Z', + description: + '제작 박스로 준비해드립니다. 오후 3시 이전 결제 완료 시 택배 출고 드립니다. 당일 상품 출고 마감 시간 3시입니다.', + etc: '유의사항', + clipCount: 0, + status: 'waiting', + applyCount: 0, + createUserId: 1, + type: 'RAFFLE', + tags: [ + {id: '1', name: 'Vans'}, + {id: '2', name: '래플'}, + ], + images: [ + 'https://github.com/user-attachments/assets/73684618-8305-4a78-bcd6-e36342b46c22', + 'https://github.com/user-attachments/assets/4a104905-0106-4b8a-8dcd-06926162e2e6', + ], +}; diff --git a/apps/front/wraffle-webview/src/features/product-menu/useMenu.ts b/apps/front/wraffle-webview/src/features/product-menu/useMenu.ts new file mode 100644 index 00000000..bfd57dd7 --- /dev/null +++ b/apps/front/wraffle-webview/src/features/product-menu/useMenu.ts @@ -0,0 +1,16 @@ +import {useState} from 'react'; + +type MenuOption = '상품' | '응모 기간' | '당첨자 발표' | '유의사항'; + +export const useMenu = (initialMenu: MenuOption) => { + const [selectedMenu, setSelectedMenu] = useState(initialMenu); + + const selectMenu = (menu: MenuOption) => { + setSelectedMenu(menu); + }; + + return { + selectedMenu, + selectMenu, + }; +}; diff --git a/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx b/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx deleted file mode 100644 index b0f38030..00000000 --- a/apps/front/wraffle-webview/src/pages/products/[productId]/layout.tsx +++ /dev/null @@ -1,26 +0,0 @@ -'use client'; - -import type {ReactNode} from 'react'; -import React from 'react'; -import {ProductInfoMenu} from '@/widgets/product-info'; - -type Props = { - children: ReactNode; -}; - -export default function Layout({children}: Props) { - const [selectedMenu, setSelectedMenu] = React.useState('상품'); // 선택된 메뉴 상태 관리 - - return ( - <> -
- - - -
{children}
- - ); -} diff --git a/apps/front/wraffle-webview/src/pages/products/[productId]/page.tsx b/apps/front/wraffle-webview/src/pages/products/[productId]/page.tsx deleted file mode 100644 index 3edb1479..00000000 --- a/apps/front/wraffle-webview/src/pages/products/[productId]/page.tsx +++ /dev/null @@ -1,132 +0,0 @@ -'use client'; - -import Image from 'next/image'; -import {useState, useEffect} from 'react'; -import {Tag} from '@wraffle/ui/src/ui/tag/Tag'; - -interface ProductData { - id: number; - title: string; - price: number; - startDate: string; - endDate: string; - announceAt: string; - description: string; - etc: string; - thumbnail: string; - clipCount: number; - status: string; - applyCount: number; - createUserId: number; - categoryId: number; - tags: string[]; - images: string[]; -} - -const sampleData: ProductData = { - id: 1, - title: '[Vans] 올드스쿨', - price: 78000, - startDate: '2024-07-31 23:20:59', - endDate: '2024-08-02 23:20:59', - announceAt: '2024-08-03 23:00:00', - description: - '제작 박스로 준비해드립니다. 오후 3시 이전 결제 완료 시 택배 출고 드립니다. 당일 상품 출고 마감 시간 3시입니다.', - etc: '유의사항', - thumbnail: - 'https://github.com/user-attachments/assets/73684618-8305-4a78-bcd6-e36342b46c22', - clipCount: 24, - status: 'WAITING', // WAITING(추첨 전), APPROVED(당첨), REJECTED(미당첨) - applyCount: 20, - createUserId: 1, - categoryId: 3, - tags: ['Vans', '래플'], - images: [ - 'https://github.com/user-attachments/assets/73684618-8305-4a78-bcd6-e36342b46c22', - 'https://github.com/user-attachments/assets/4a104905-0106-4b8a-8dcd-06926162e2e6', - ], -}; - -function formatDate(dateString: string) { - const date = new Date(dateString); - const month = date.getMonth() + 1; - const day = date.getDate(); - const hours = date.getHours().toString().padStart(2, '0'); - const minutes = date.getMinutes().toString().padStart(2, '0'); - const seconds = date.getSeconds().toString().padStart(2, '0'); - - return `${month}월 ${day}일 ${hours}:${minutes}:${seconds}`; -} - -export default function Product() { - const [productData, setProductData] = useState(null); - - useEffect(() => { - setProductData(sampleData); - }, []); - - if (!productData) { - return
Loading...
; - } - - return ( -
-
- Product Images -
-
- {/* Tag와 Title, Price */} -
-
- {productData.tags.map((tag, index) => ( - {tag} - ))} -
-
-

{productData.title}

-

- {productData.price.toLocaleString()}원 -

-
-
- -
- - {/* 응모 기간과 날짜 */} -
-

응모 기간

-

- {formatDate(productData.startDate)} ~{' '} - {formatDate(productData.endDate)} -

-
- -
- - {/* 당첨자 발표와 날짜 */} -
-

당첨자 발표

-

- {formatDate(productData.announceAt)} -

-
- -
- - {/* 유의사항과 Description */} -
-

유의사항

-

{productData.description}

-
-
-
- ); -} diff --git a/apps/front/wraffle-webview/src/widgets/product-info/ProductInfoMenu.tsx b/apps/front/wraffle-webview/src/widgets/product-info/ProductInfoMenu.tsx index 09d0d475..15113fa8 100644 --- a/apps/front/wraffle-webview/src/widgets/product-info/ProductInfoMenu.tsx +++ b/apps/front/wraffle-webview/src/widgets/product-info/ProductInfoMenu.tsx @@ -1,11 +1,13 @@ 'use client'; +type MenuOption = '상품' | '응모 기간' | '당첨자 발표' | '유의사항'; + interface ProductInfoMenuProps { - selectedMenu: string; - onSelectMenu: (menu: string) => void; + selectedMenu: MenuOption; + onSelectMenu: (menu: MenuOption) => void; } -const menus = ['상품', '응모 기간', '당첨자 발표', '유의사항']; +const menus: MenuOption[] = ['상품', '응모 기간', '당첨자 발표', '유의사항']; export default function ProductInfoMenu({ selectedMenu, @@ -13,9 +15,9 @@ export default function ProductInfoMenu({ }: ProductInfoMenuProps) { return (