-
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.
Feat: create editProfilPage and connect button to page #11
- Loading branch information
1 parent
17ef12a
commit 1d6e4da
Showing
3 changed files
with
34 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import { Typography } from "@mui/material"; | ||
import Avatar from "@mui/material/Avatar"; | ||
import Default from "../assets/images/defaultavatar.svg"; | ||
import { COLOR } from "../styles/color"; | ||
|
||
const EditProfilPage = () => { | ||
return <StEditProfilPage> | ||
<h2>잘오셧습니다.</h2> | ||
</StEditProfilPage>; | ||
}; | ||
|
||
const StEditProfilPage = styled.div` | ||
width: 100%; | ||
height: 100%; | ||
`; | ||
|
||
export default EditProfilPage; |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ import { Typography } from "@mui/material"; | |
import Avatar from "@mui/material/Avatar"; | ||
import Default from "../assets/images/defaultavatar.svg"; | ||
import { COLOR } from "../styles/color"; | ||
import { useNavigate } from "react-router-dom"; | ||
import List from "@mui/material/List"; | ||
import ListItem from "@mui/material/ListItem"; | ||
import ListItemButton from "@mui/material/ListItemButton"; | ||
|
@@ -12,10 +13,15 @@ import LogoutOutlinedIcon from "@mui/icons-material/LogoutOutlined"; | |
import DoDisturbOutlinedIcon from "@mui/icons-material/DoDisturbOutlined"; | ||
|
||
const MypagePage = () => { | ||
const navigate = useNavigate(); | ||
|
||
const goToEdit = () => { | ||
navigate("/editprofil"); | ||
}; | ||
const Menu = [ | ||
{ icon: <ModifyIcon />, text: "프로필 편집" }, | ||
{ icon: <LogoutIcon />, text: "로그아웃" }, | ||
{ icon: <CancelIcon />, text: "계정 탈퇴" }, | ||
{ icon: <ModifyIcon />, text: "프로필 편집", action: goToEdit }, | ||
{ icon: <LogoutIcon />, text: "로그아웃", action: goToEdit }, | ||
{ icon: <CancelIcon />, text: "계정 탈퇴", action: goToEdit }, | ||
]; | ||
return ( | ||
<StMyPagePage> | ||
|
@@ -28,12 +34,12 @@ const MypagePage = () => { | |
<MailP>[email protected]</MailP> | ||
</ProfilDiv> | ||
<MenuDiv> | ||
<List> | ||
<List sx={{width: "100%"}}> | ||
{Menu.map((it) => { | ||
return ( | ||
<div key={it.text}> | ||
<MenuLstItem disablePadding> | ||
<MenuLIBtn> | ||
<MenuLIBtn onClick={it.action}> | ||
{it.icon} | ||
<MenuP>{it.text}</MenuP> | ||
</MenuLIBtn> | ||
|
@@ -106,14 +112,14 @@ const MenuDiv = styled.div` | |
`; | ||
|
||
const MenuLstItem = styled(ListItem)` | ||
/* border: 1px solid black; */ | ||
width: 100%; | ||
height: 5rem; | ||
margin-left: 0.2rem 0rem 0.2rem 1.2rem; | ||
`; | ||
|
||
const MenuLIBtn = styled(ListItemButton)` | ||
/* border: 1px solid blue; */ | ||
display: flex; | ||
width: 100%; | ||
`; | ||
|
||
const MenuP = styled.p` | ||
|
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