-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] #4 마이페이지 기능 및 디자인
- Loading branch information
Showing
13 changed files
with
186 additions
and
28 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
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
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
13 changes: 13 additions & 0 deletions
13
weatherfit_refactoring/src/Components/Molecules/ProfileModalInfo.tsx
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,13 @@ | ||
interface Props { | ||
title: string | ||
value: string | ||
} | ||
|
||
export default function ProfileModalInfo({ title, value }: Props) { | ||
return ( | ||
<div className="flex font-gmarketsans text-[11px] "> | ||
<p>{title}:</p> | ||
<p className="text-[gray]"> {value}</p> | ||
</div> | ||
) | ||
} |
13 changes: 13 additions & 0 deletions
13
weatherfit_refactoring/src/Components/Organisms/ProfileBoard.tsx
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,13 @@ | ||
import React, { useState } from 'react' | ||
import ProfilePostBar from '../Molecules/ProfilePostBar' | ||
|
||
export default function ProfileBoard() { | ||
// 여기서 게시물 수 불러오기 | ||
|
||
return ( | ||
<> | ||
<ProfilePostBar /> | ||
<ProfileBoard /> | ||
</> | ||
) | ||
} |
77 changes: 77 additions & 0 deletions
77
weatherfit_refactoring/src/Components/Organisms/ProfileEditModal.tsx
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,77 @@ | ||
'use client' | ||
|
||
import IconStore, { IconStyle } from '../Atoms/Icon/IconStore' | ||
import BoxStore, { BoxStyle } from '../Atoms/Box/BoxStore' | ||
import InputStore, { InputStyle } from '../Atoms/Input/InputStore' | ||
import ButtonStore, { ButtonStyle } from '@/Components/Atoms/Button/ButtonStore' | ||
import ProfileModalInfo from '../Molecules/ProfileModalInfo' | ||
|
||
interface Props { | ||
onClickFunction?: () => void | ||
} | ||
|
||
export default function ProfileEditModal({ onClickFunction }: Props) { | ||
return ( | ||
<div className="fixed top-0 left-0 w-[100%] h-[100%] bg-[#00000066] z-[100] flex justify-center items-center"> | ||
<div className="bg-[#ffffff] w-[70vw] h-[85vh] rounded-md z-[200]"> | ||
{/* 헤더 부분 */} | ||
<div className="flex justify-center items-center relative my-[10px]"> | ||
<IconStore | ||
iconStyle={IconStyle.PREV2} | ||
size={20} | ||
style="ml-[10px] cursor-pointer absolute left-0" | ||
onClickFunction={onClickFunction} | ||
/> | ||
<BoxStore | ||
boxStyle={BoxStyle.BOX_BLUE} | ||
style="px-2 h-[21px] font-neurimboGothic text-[17px] pb-[5px] shadow-[7px_7px_1px] flex items-center"> | ||
프로필 편집 | ||
</BoxStore> | ||
</div> | ||
<div className="p-[20px]"> | ||
<hr className="my-[10px]" /> | ||
{/* 이메일, 이름, 닉네임 부분 */} | ||
<div className="fix_info"> | ||
<ProfileModalInfo title="이메일" value="user@test.com" /> | ||
<ProfileModalInfo title="이름" value="가나다" /> | ||
<ProfileModalInfo title="닉네임" value="깜찍이" /> | ||
</div> | ||
<hr className="my-[10px]" /> | ||
{/* 비밀번호 부분 */} | ||
<form className="flex flex-col items-center "> | ||
<div className="pw_box"> | ||
<p className="font-gmarketsans text-[11px] mb-[5px]"> | ||
비밀번호 (8~20자 영문, 숫자, 특수기호 조합) | ||
</p> | ||
<div className="mb-[5px]"> | ||
<InputStore | ||
inputStyle={InputStyle.INPUT_WHITE} | ||
inputType="password" | ||
placeholderContents="현재 비밀번호" | ||
style="w-[40vw] h-[4vh] text-[12px] mb-[5px]" | ||
/> | ||
<InputStore | ||
inputStyle={InputStyle.INPUT_WHITE} | ||
inputType="password" | ||
placeholderContents="변경 비밀번호" | ||
style="w-[40vw] h-[4vh] text-[12px] mb-[5px]" | ||
/> | ||
<InputStore | ||
inputStyle={InputStyle.INPUT_WHITE} | ||
inputType="password" | ||
placeholderContents="변경 비밀번호 재확인" | ||
style="w-[40vw] h-[4vh] text-[12px] mb-[5px]" | ||
/> | ||
</div> | ||
</div> | ||
<ButtonStore | ||
buttonStyle={ButtonStyle.CATEGORY_BTN_Y} | ||
style="font-neurimboGothic w-[20vw]"> | ||
수정 | ||
</ButtonStore> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
14 changes: 14 additions & 0 deletions
14
weatherfit_refactoring/src/Components/Organisms/ProfileHeader.tsx
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,18 +1,32 @@ | ||
'use client' | ||
|
||
import React, { useState, MouseEventHandler } from 'react' | ||
import { ButtonStyle } from '../Atoms/Button/ButtonStore' | ||
import { IconStyle } from '../Atoms/Icon/IconStore' | ||
import Header from '../Molecules/Header' | ||
import ProfileEditModal from './ProfileEditModal' | ||
|
||
export default function ProfileHeader() { | ||
const [isModalOpen, setIsModalOpen] = useState(false) | ||
|
||
const handleModalOpen = () => { | ||
setIsModalOpen(true) | ||
} | ||
|
||
const handleModalClose = () => { | ||
setIsModalOpen(false) | ||
} | ||
|
||
return ( | ||
<> | ||
<Header | ||
isIcon={true} | ||
title="프로필" | ||
iconStyleCase={IconStyle.PREV2} | ||
iconStyleCase2={IconStyle.SETTING} | ||
onClickFunction2={handleModalOpen} | ||
/> | ||
{isModalOpen && <ProfileEditModal onClickFunction={handleModalClose} />} | ||
</> | ||
) | ||
} |
2 changes: 1 addition & 1 deletion
2
weatherfit_refactoring/src/Components/molecules/ProfileInfo.tsx
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
23 changes: 13 additions & 10 deletions
23
weatherfit_refactoring/src/Components/molecules/ProfilePost.tsx
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,14 @@ | ||
export default function ProfilePost() { | ||
return( | ||
<> | ||
<div className="flex"> | ||
<div className="bg-[salmon] h-[180px] rounded-[2%] w-[115px]"></div> | ||
<div className="bg-[salmon] h-[180px] rounded-[2%] w-[115px]"></div> | ||
<div className="bg-[salmon] h-[180px] rounded-[2%] w-[115px]"></div> | ||
</div> | ||
</> | ||
) | ||
} | ||
return ( | ||
<div className="grid grid-rows-[25vh_25vh_25vh] grid-cols-[1fr_1fr_1fr] gap-[1%] p-[10px]"> | ||
{/* <div className="bg-[salmon] h-[180px] rounded-[2%] w-[115px]"></div> */} | ||
<div className="bg-[salmon] rounded-lg"></div> | ||
<div className="bg-[salmon] rounded-lg"></div> | ||
<div className="bg-[salmon] rounded-lg"></div> | ||
<div className="bg-[salmon] rounded-lg"></div> | ||
<div className="bg-[salmon] rounded-lg"></div> | ||
<div className="bg-[salmon] rounded-lg"></div> | ||
<div className="bg-[salmon] rounded-lg"></div> | ||
</div> | ||
) | ||
} |
50 changes: 40 additions & 10 deletions
50
weatherfit_refactoring/src/Components/molecules/ProfilePostBar.tsx
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,12 +1,42 @@ | ||
import ButtonStore, { ButtonStyle } from "../Atoms/Button/ButtonStore"; | ||
'use client' | ||
import { useState } from 'react' | ||
import ButtonStore, { ButtonStyle } from '../Atoms/Button/ButtonStore' | ||
|
||
export default function ProfilePostBar() { | ||
return ( | ||
<> | ||
<div className="flex justify-evenly"> | ||
<ButtonStore buttonStyle={ButtonStyle.DEFAULT_BTN_FILL} style="font-neurimboGothic w-[100px]">피드</ButtonStore> | ||
<ButtonStore buttonStyle={ButtonStyle.DEFAULT_BTN} style="font-neurimboGothic w-[100px]">좋아요</ButtonStore> | ||
</div> | ||
</> | ||
) | ||
} | ||
const [isFeedSelected, setIsFeedSelected] = useState<boolean>(true) | ||
|
||
const handleFeedClike = () => { | ||
setIsFeedSelected(true) | ||
} | ||
|
||
const handleLikeClick = () => { | ||
setIsFeedSelected(false) | ||
} | ||
|
||
return ( | ||
<> | ||
<div className="flex justify-evenly my-[10px]"> | ||
<ButtonStore | ||
buttonStyle={ | ||
isFeedSelected | ||
? ButtonStyle.DEFAULT_BTN_FILL | ||
: ButtonStyle.DEFAULT_BTN | ||
} | ||
style="font-neurimboGothic w-[100px]" | ||
onClickFunction={handleFeedClike}> | ||
피드 | ||
</ButtonStore> | ||
<ButtonStore | ||
buttonStyle={ | ||
!isFeedSelected | ||
? ButtonStyle.DEFAULT_BTN_FILL | ||
: ButtonStyle.DEFAULT_BTN | ||
} | ||
style="font-neurimboGothic w-[100px]" | ||
onClickFunction={handleLikeClick}> | ||
좋아요 | ||
</ButtonStore> | ||
</div> | ||
</> | ||
) | ||
} |
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