-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70c8706
commit bf0b28c
Showing
6 changed files
with
79 additions
and
8 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,23 @@ | ||
import React, { useState } from "react"; | ||
import Profile from "src/components/home/profile/profile"; | ||
import ProfileEdit from "src/components/home/profile/profileEdit"; | ||
|
||
const MainProfile: React.FC = () => { | ||
const [isEditing, setIsEditing] = useState(false); | ||
|
||
const handleEditToggle = () => { | ||
setIsEditing(!isEditing); | ||
}; | ||
|
||
return ( | ||
<div> | ||
{isEditing ? ( | ||
<ProfileEdit onCancel={handleEditToggle} /> | ||
) : ( | ||
<Profile onEdit={handleEditToggle} /> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default MainProfile; |
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,19 @@ | ||
import React from "react"; | ||
import * as S from "src/components/home/profile/profileEdit/style"; | ||
interface ProfileEditProps { | ||
onCancel: () => void; | ||
} | ||
|
||
const ProfileEdit: React.FC<ProfileEditProps> = ({ onCancel }) => { | ||
return ( | ||
<S.profileWrap> | ||
<S.mainWrap> | ||
<h1>프로필 수정</h1> | ||
<button onClick={onCancel}>취소</button> | ||
</S.mainWrap> | ||
</S.profileWrap> | ||
) | ||
; | ||
}; | ||
|
||
export default ProfileEdit; |
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,23 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const profileWrap = styled.main` | ||
display: flex; | ||
flex-direction: column; | ||
margin-top: 4.44vh; | ||
width: 100%; | ||
height: calc(100% - 4.44vh); | ||
align-items: center; | ||
justify-content: center; | ||
`; | ||
|
||
export const mainWrap = styled.main` | ||
width: 72vw; | ||
height: 80vh; | ||
border-radius: 13px; | ||
background: #fff; | ||
box-shadow: 0px 3px 9px 0px rgba(0, 0, 0, 0.12); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 15px; | ||
`; |
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 @@ | ||
import styled from 'styled-components'; |
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,7 +1,8 @@ | ||
import React from "react"; | ||
import Profile from "src/components/home/profile/profile"; | ||
import MainProfile from "src/components/home/profile/index"; | ||
|
||
const ProfilePage=()=>{ | ||
return <Profile/> | ||
} | ||
export default ProfilePage; | ||
const ProfilePage: React.FC = () => { | ||
return <MainProfile />; | ||
}; | ||
|
||
export default ProfilePage; |