-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from miind-palace/dev
Dev into Main
- Loading branch information
Showing
90 changed files
with
16,971 additions
and
1,517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"plugins": ["prettier"], | ||
"extends": ["next", "plugin:prettier/recommended", "prettier"] | ||
"plugins": [ | ||
"prettier" | ||
], | ||
"extends": [ | ||
"next", | ||
"plugin:prettier/recommended", | ||
"prettier", | ||
"plugin:storybook/recommended" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
### 관련 문서 | ||
## 관련 문서 | ||
<!--노션, Figma, 이슈 링크--> | ||
<!--Closes 뒤에 본 PR을 머지하면 close할 issue number를 적어주세요.--> | ||
|
||
Closes [issue link] | ||
Closes #issue link | ||
|
||
### 변경사항: | ||
## 변경사항: | ||
<!--중요 커밋은 링크로 연결해서 추가--> | ||
|
||
### 확인할 목록: | ||
## 확인할 목록: | ||
<!--리뷰어에게 부탁할 확인 목록 및 테스트 방법을 작성--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# .github/workflows/chromatic.yml | ||
|
||
# Workflow name | ||
name: 'Chromatic' | ||
|
||
# Event for the workflow | ||
on: push | ||
|
||
# List of jobs | ||
jobs: | ||
chromatic-deployment: | ||
# Operating System | ||
runs-on: ubuntu-latest | ||
# Job steps | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install dependencies | ||
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm | ||
run: yarn | ||
# 👇 Adds Chromatic as a step in the workflow | ||
- name: Publish to Chromatic | ||
uses: chromaui/action@v1 | ||
# Chromatic GitHub Action options | ||
with: | ||
# 👇 Chromatic projectToken, refer to the manage page to obtain it. | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,7 @@ yarn-error.log* | |
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
.env | ||
.env | ||
|
||
.env.development | ||
.env.production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { StorybookConfig } from '@storybook/nextjs' | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-interactions', | ||
], | ||
framework: { | ||
name: '@storybook/nextjs', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { Preview } from '@storybook/react' | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export default preview |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { ChangeEvent, FormEvent } from 'react' | ||
import styled from '@emotion/styled' | ||
import Input from '@/components/common/Input/Input' | ||
import BasicButton from '../common/Button/BasicButton' | ||
import Spacing from '../common/Spacing/Spacing' | ||
import { axiosHttp } from '@/lib/utils/httpCore' | ||
import { validateEmail } from '@/lib/utils/validateUserInfo' | ||
|
||
interface CheckEmailFormProps { | ||
email: string | ||
onChangeEmail: (e: ChangeEvent<HTMLInputElement>) => void | ||
goNextStep: () => void | ||
} | ||
|
||
export default function CheckEmailForm({ email, onChangeEmail, goNextStep }: CheckEmailFormProps) { | ||
const checkValidateEmail = async (email: string) => { | ||
const { data } = await axiosHttp.post(`/member/mailCheck?memberEmail=${email}`) | ||
const result = { | ||
...data, | ||
} | ||
return result | ||
} | ||
|
||
const handleValidateEmail = async (e: FormEvent) => { | ||
e.preventDefault() | ||
console.log('clicked!') | ||
|
||
// 이메일 형식 체크 로직 | ||
const isValidEmail = validateEmail(email) | ||
if (!isValidEmail) { | ||
alert('이메일 형식이 올바르지 않습니다.') | ||
return | ||
} | ||
|
||
// 이메일 중복 검증 로직 | ||
const { duplicated, message } = await checkValidateEmail(email) | ||
if (duplicated) { | ||
alert(message) | ||
return | ||
} | ||
|
||
alert('사용할 수 있는 이메일입니다.') | ||
goNextStep() | ||
} | ||
|
||
return ( | ||
<Wrapper> | ||
<form onSubmit={handleValidateEmail} autoComplete="off"> | ||
<Spacing size={20} /> | ||
<Input | ||
inputLabel="Email" | ||
id="email" | ||
type="text" | ||
name="email" | ||
colorType="PENETRATED_WHITE" | ||
onChange={onChangeEmail} | ||
/> | ||
<Spacing size={10} /> | ||
<BasicButton type="submit">이메일 중복 확인</BasicButton> | ||
</form> | ||
</Wrapper> | ||
) | ||
} | ||
|
||
const Wrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
` | ||
|
||
const AVAILABLE_EMAIL_MSG = '사용가능한 이메일입니다!' |
Oops, something went wrong.