Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1단계 - 장바구니 협업] 유세지(김용래) 미션 제출합니다. #20

Merged
merged 30 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6743eac
chore: project init
usageness May 31, 2022
11c7a78
docs : 요구사항 문서 작성
usageness May 31, 2022
64c6629
feat: Input 컴포넌트 구현
usageness May 31, 2022
5028bcb
style : 새 Input 컴포넌트 적용
usageness May 31, 2022
836d188
feat: 로그인 페이지 컴포넌트 구현
usageness May 31, 2022
d5b0947
feat: Icon 컴포넌트 구현
usageness May 31, 2022
ac16179
feat: 에러 메시지 컴포넌트 추가
usageness May 31, 2022
5914a00
feat: 회원가입 페이지 컴포넌트 구현
usageness May 31, 2022
c48b97f
feat : 본인확인 페이지 컴포넌트 구현
usageness May 31, 2022
da1e712
feat : 회원 정보 수정 페이지 컴포넌트 구현
usageness May 31, 2022
f56ed6e
feat : 비밀번호 변경 페이지 컴포넌트 구현
usageness May 31, 2022
f37a603
feat : MSW를 활용한 API 모킹 구성
usageness Jun 1, 2022
881cfda
fix : 헤더 메뉴 구성 및 스타일 변경
usageness Jun 1, 2022
b95f882
feat : Token 기반 로그인 기능 구현
usageness Jun 1, 2022
3f4545c
feat : 회원가입 기능 구현
usageness Jun 1, 2022
5198d9e
fix : 로그인 상태에 따른 헤더 적용
usageness Jun 1, 2022
814a565
feat : 회원 정보 수정 전 본인 확인 기능 구현
usageness Jun 1, 2022
0762958
feat : 회원 정보 수정 기능 구현
usageness Jun 1, 2022
18431a9
refactor : 누락된 스토리북 추가 및 버그 픽스
usageness Jun 1, 2022
67d9bf4
fix : Authorization header 추가
usageness Jun 2, 2022
b15ea62
feat : 회원 탈퇴 기능 구현
usageness Jun 2, 2022
bb47437
feat : logout 기능 구현
usageness Jun 2, 2022
b7c1584
feat : 로그인 시 유저 아이디를 받아와서 redux에서 관리
usageness Jun 2, 2022
1c7c298
feat : 로그아웃 기능 구현
usageness Jun 2, 2022
c9378b6
feat : 비밀번호 수정 기능 구현
usageness Jun 2, 2022
fcd53dd
feat : Spinner 컴포넌트 구현
usageness Jun 2, 2022
bf73b3a
feat : 서버 응답 대기시 Spinner 애니메이션 띄워주기
usageness Jun 2, 2022
75a6dd1
fix : key 값으로 uuid 전달하여 오류 해결
usageness Jun 2, 2022
a91ed95
refactor: user action과 api 로직 분리
usageness Jun 2, 2022
d1b357a
refactor: alert을 snackbar 메시지로 변경
usageness Jun 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat : 회원 정보 수정 페이지 컴포넌트 구현
Co-authored-by: JASUN LEE <[email protected]>
  • Loading branch information
usageness and liswktjs committed May 31, 2022
commit da1e712291148bccd829a523e23cef5a395a7c1a
1 change: 1 addition & 0 deletions REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [x] ErrorMessage 컴포넌트 구현
- [x] 회원가입 페이지 컴포넌트 구현
- [x] 본인확인 페이지 컴포넌트 구현
- [x] 회원 정보 수정 페이지 컴포넌트 구현

## API

Expand Down
5 changes: 5 additions & 0 deletions src/components/@common/Input/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ const Input = styled.input`
font-size: ${(props) => props.size || '1.16rem'};
border-radius: 4px;
outline: none;

&:focus {
border-color: ${(props) => props.focusBorderColor || COLORS.MINT_200};
}

&:disabled {
background-color: ${COLORS.GRAY_300};
}
`;

export default Input;
89 changes: 89 additions & 0 deletions src/pages/EditUserInfo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import React from 'react';
import Layout from 'components/Layout';

import PageHeader from 'components/@common/PageHeader';
import Button from 'components/@common/Button/styles';
import Input from 'components/@common/Input/styles';
import ErrorMessage from 'components/@common/ErrorMessage';

import { COLORS } from 'styles/theme';

import * as CommonStyled from 'components/@common/CommonStyle/styles';
import * as Styled from './styles';

const EditUserInfo = () => (
<Layout>
<Styled.SignUpContainer>
<CommonStyled.Container flexDirection="column" justifyContent="center">
<PageHeader color={COLORS.GRAY_300}>회원 정보 수정</PageHeader>
<form style={{ width: '100%' }}>
<label html-for="input-user-name">
아이디
<Input
id="input-user-name"
type="text"
width="100%"
value="유저아이디(이부분은변경해주셔야합니다)"
margin="1rem 0"
border={`1px solid ${COLORS.GRAY_400}`}
focusBorderColor={COLORS.MINT_200}
disabled
/>
</label>

<label html-for="input-user-nickname">
이름
<Input
id="input-user-nickname"
placeholder="이름을 입력해주세요"
type="text"
minLength={1}
maxLegnth={10}
margin="1rem 0"
border={`1px solid ${COLORS.GRAY_400}`}
/>
</label>
<ErrorMessage>1~10글자 이내로 입력해주세요</ErrorMessage>

<label html-for="input-user-age">
나이
<Input
id="input-user-age"
placeholder="나이를 입력해주세요"
type="number"
min={0}
max={200}
margin="1rem 0"
border={`1px solid ${COLORS.GRAY_400}`}
/>
</label>

<ErrorMessage>0살 이상의 숫자를 입력해주세요</ErrorMessage>
<Button margin="0.5rem 0" backgroundColor={COLORS.MINT_200} hoverColor={COLORS.MINT_100}>
수정하기
</Button>
<Button
type="button"
margin="0.5rem 0"
backgroundColor={COLORS.MINT_200}
hoverColor={COLORS.MINT_100}
>
비밀번호 변경하기
</Button>
<Button
type="button"
margin="0.5rem 0"
color={COLORS.RED_100}
border={`1px solid ${COLORS.RED_100}`}
backgroundColor={COLORS.WHITE}
hoverColor={COLORS.RED_100}
>
회원탈퇴
</Button>
</form>
</CommonStyled.Container>
</Styled.SignUpContainer>
</Layout>
);

export default EditUserInfo;
4 changes: 2 additions & 2 deletions src/pages/SignUp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ const SignUp = () => {
id="input-user-age"
placeholder="나이를 입력해주세요"
type="number"
min={1}
max={10}
min={0}
max={200}
margin="1rem 0"
border={`1px solid ${COLORS.GRAY_400}`}
/>
Expand Down
17 changes: 17 additions & 0 deletions src/stories/EditUserInfo.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import EditUserInfo from 'pages/EditUserInfo';

export default {
title: 'Pages/EditUserInfo',
component: EditUserInfo,
decorators: [
(Story) => (
<div style={{ maxWidth: '1000px' }}>
<Story />
</div>
),
],
};

const Template = (args) => <EditUserInfo {...args} />;

export const DefaultTemplate = Template.bind({});