Skip to content

Commit

Permalink
MyPage디자인 수정, API 변경사항 적용 (UserRole)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhello0507 committed Jan 3, 2025
1 parent 0fc61e1 commit e9f387e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
4 changes: 2 additions & 2 deletions src/page/mypage/MyPage.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ const S = {
height: 100%;
padding: 110px 24px 0 24px;
align-items: stretch;
gap: 20px;
`,
item: styled.div`
profileWrapper: styled.div`
display: flex;
height: 67px;
align-items: center;
cursor: pointer;
`
},
baseInfo: {
Expand Down
39 changes: 11 additions & 28 deletions src/page/mypage/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@ function MyPage() {
<HasHeader>
<S.container>
<S.sideBar.container>
<SideBarItem title={'프로필'} selected={false} onClick={() => {
<S.sideBar.profileWrapper>
<Text text={'프로필'} type={TextType.p2} onClick={() => {

}}/>
<SideBarItem title={'설정'} selected={false} onClick={() => {
}}/>
</S.sideBar.profileWrapper>
<HorizontalDivider color={colors.g200}/>
<Text text={'로그아웃'} type={TextType.p2} color={colors.g400} style={{cursor: 'pointer'}}
onClick={() => {

}}/>
<HorizontalDivider color={colors.g200} style={{marginTop: 20}}/>
<SideBarItem title={'로그아웃'} selected={false} onClick={() => {
}}/>
<Text text={'회원탈퇴'} type={TextType.p2} color={'#D65745'} style={{cursor: 'pointer'}}
onClick={() => {

}}/>
}}/>
</S.sideBar.container>
<S.baseInfo.container>
<Text text={'기본 정보'} type={TextType.p2} style={{fontWeight: '700'}}/>
Expand Down Expand Up @@ -59,25 +63,4 @@ function MyPage() {
);
}

// SideBarItem
interface SideBarItemProps {
title: string;
selected: boolean;
onClick: () => void;
}

function SideBarItem(
{
title,
selected,
onClick
}: SideBarItemProps
) {
return (
<S.sideBar.item onClick={onClick}>
<Text text={title} type={TextType.p2} color={selected ? colors.black : colors.g400}/>
</S.sideBar.item>
);
}

export default MyPage;
6 changes: 6 additions & 0 deletions src/remote/enumeration/UserRole.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
enum UserRole {
ROLE_ADMIN,
ROLE_USER,
}

export default UserRole;
3 changes: 3 additions & 0 deletions src/remote/value/InfoMember.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import UserRole from "@remote/enumeration/UserRole";

export default interface InfoMember {
picture: string; // 프사
name: string; // 이름
email: string; // 이메일
role: UserRole;
}

0 comments on commit e9f387e

Please sign in to comment.