From d83cb5c869413da930fac3c0581b75f55ad0041d Mon Sep 17 00:00:00 2001 From: kr-nius Date: Mon, 22 Jan 2024 21:19:47 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20#4=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EA=B8=B0=EB=8A=A5=20=EB=B0=8F=20=EB=94=94?= =?UTF-8?q?=EC=9E=90=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Atoms/Button/ButtonStore.tsx | 2 +- .../src/Components/Atoms/Icon/IconStore.tsx | 1 + .../src/Components/Atoms/Input/InputStore.tsx | 4 +- .../src/Components/Molecules/Header.tsx | 11 ++- .../Components/Molecules/ProfileModalInfo.tsx | 13 ++++ .../src/Components/Organisms/ProfileBoard.tsx | 13 ++++ .../Components/Organisms/ProfileEditModal.tsx | 77 +++++++++++++++++++ .../Components/Organisms/ProfileHeader.tsx | 14 ++++ .../src/Components/molecules/ProfileInfo.tsx | 2 +- .../src/Components/molecules/ProfilePost.tsx | 23 +++--- .../Components/molecules/ProfilePostBar.tsx | 50 +++++++++--- .../src/app/mypage/page.tsx | 3 - weatherfit_refactoring/src/app/page.tsx | 1 + 13 files changed, 186 insertions(+), 28 deletions(-) create mode 100644 weatherfit_refactoring/src/Components/Molecules/ProfileModalInfo.tsx create mode 100644 weatherfit_refactoring/src/Components/Organisms/ProfileBoard.tsx create mode 100644 weatherfit_refactoring/src/Components/Organisms/ProfileEditModal.tsx diff --git a/weatherfit_refactoring/src/Components/Atoms/Button/ButtonStore.tsx b/weatherfit_refactoring/src/Components/Atoms/Button/ButtonStore.tsx index 91f6d28..c39f099 100644 --- a/weatherfit_refactoring/src/Components/Atoms/Button/ButtonStore.tsx +++ b/weatherfit_refactoring/src/Components/Atoms/Button/ButtonStore.tsx @@ -60,7 +60,7 @@ export default function ButtonStore({ case ButtonStyle.CATEGORY_BTN_Y: return ( diff --git a/weatherfit_refactoring/src/Components/Atoms/Icon/IconStore.tsx b/weatherfit_refactoring/src/Components/Atoms/Icon/IconStore.tsx index b431766..4e845f1 100644 --- a/weatherfit_refactoring/src/Components/Atoms/Icon/IconStore.tsx +++ b/weatherfit_refactoring/src/Components/Atoms/Icon/IconStore.tsx @@ -187,6 +187,7 @@ export default function IconStore({ width={size} height={size} className={`${style}`} + onClick={onClickFunction} /> ) case IconStyle.ETC: diff --git a/weatherfit_refactoring/src/Components/Atoms/Input/InputStore.tsx b/weatherfit_refactoring/src/Components/Atoms/Input/InputStore.tsx index 6c9e442..b6caf57 100644 --- a/weatherfit_refactoring/src/Components/Atoms/Input/InputStore.tsx +++ b/weatherfit_refactoring/src/Components/Atoms/Input/InputStore.tsx @@ -8,6 +8,7 @@ export enum InputStyle { interface Props { inputStyle: InputStyle + inputType?: string placeholderContents?: string value?: string style?: string @@ -16,6 +17,7 @@ interface Props { export default function InputStore({ inputStyle, + inputType, placeholderContents, style, onChageFunction, @@ -25,7 +27,7 @@ export default function InputStore({ case InputStyle.INPUT_WHITE: return ( diff --git a/weatherfit_refactoring/src/Components/Molecules/Header.tsx b/weatherfit_refactoring/src/Components/Molecules/Header.tsx index c69edcc..a8a1716 100644 --- a/weatherfit_refactoring/src/Components/Molecules/Header.tsx +++ b/weatherfit_refactoring/src/Components/Molecules/Header.tsx @@ -13,6 +13,7 @@ interface Props { iconStyleCase2?: IconStyle buttonStyleCase?: ButtonStyle onClickFunction?: MouseEventHandler | undefined + onClickFunction2?: () => void } export default function Header({ @@ -23,9 +24,10 @@ export default function Header({ iconStyleCase2, buttonStyleCase, onClickFunction, + onClickFunction2, }: Props) { return ( -
+
{isIcon && iconStyleCase2 != null ? ( - + ) : buttonStyleCase != null ? ( +

{title}:

+

 {value}

+
+ ) +} diff --git a/weatherfit_refactoring/src/Components/Organisms/ProfileBoard.tsx b/weatherfit_refactoring/src/Components/Organisms/ProfileBoard.tsx new file mode 100644 index 0000000..e00394f --- /dev/null +++ b/weatherfit_refactoring/src/Components/Organisms/ProfileBoard.tsx @@ -0,0 +1,13 @@ +import React, { useState } from 'react' +import ProfilePostBar from '../Molecules/ProfilePostBar' + +export default function ProfileBoard() { + // 여기서 게시물 수 불러오기 + + return ( + <> + + + + ) +} diff --git a/weatherfit_refactoring/src/Components/Organisms/ProfileEditModal.tsx b/weatherfit_refactoring/src/Components/Organisms/ProfileEditModal.tsx new file mode 100644 index 0000000..efbe3dd --- /dev/null +++ b/weatherfit_refactoring/src/Components/Organisms/ProfileEditModal.tsx @@ -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 ( +
+
+ {/* 헤더 부분 */} +
+ + + 프로필 편집 + +
+
+
+ {/* 이메일, 이름, 닉네임 부분 */} +
+ + + +
+
+ {/* 비밀번호 부분 */} +
+
+

+ 비밀번호 (8~20자 영문, 숫자, 특수기호 조합) +

+
+ + + +
+
+ + 수정 + +
+
+
+
+ ) +} diff --git a/weatherfit_refactoring/src/Components/Organisms/ProfileHeader.tsx b/weatherfit_refactoring/src/Components/Organisms/ProfileHeader.tsx index 109ccdd..b3a1283 100644 --- a/weatherfit_refactoring/src/Components/Organisms/ProfileHeader.tsx +++ b/weatherfit_refactoring/src/Components/Organisms/ProfileHeader.tsx @@ -1,10 +1,22 @@ '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 ( <>
+ {isModalOpen && } ) } diff --git a/weatherfit_refactoring/src/Components/molecules/ProfileInfo.tsx b/weatherfit_refactoring/src/Components/molecules/ProfileInfo.tsx index 213f48b..f413be7 100644 --- a/weatherfit_refactoring/src/Components/molecules/ProfileInfo.tsx +++ b/weatherfit_refactoring/src/Components/molecules/ProfileInfo.tsx @@ -1,6 +1,6 @@ export default function ProfileInfo() { return ( -
+

깜찍이

diff --git a/weatherfit_refactoring/src/Components/molecules/ProfilePost.tsx b/weatherfit_refactoring/src/Components/molecules/ProfilePost.tsx index fb5c7c7..886ae94 100644 --- a/weatherfit_refactoring/src/Components/molecules/ProfilePost.tsx +++ b/weatherfit_refactoring/src/Components/molecules/ProfilePost.tsx @@ -1,11 +1,14 @@ export default function ProfilePost() { - return( - <> -
-
-
-
-
- - ) -} \ No newline at end of file + return ( +
+ {/*
*/} +
+
+
+
+
+
+
+
+ ) +} diff --git a/weatherfit_refactoring/src/Components/molecules/ProfilePostBar.tsx b/weatherfit_refactoring/src/Components/molecules/ProfilePostBar.tsx index 8e251de..413a104 100644 --- a/weatherfit_refactoring/src/Components/molecules/ProfilePostBar.tsx +++ b/weatherfit_refactoring/src/Components/molecules/ProfilePostBar.tsx @@ -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 ( - <> -
- 피드 - 좋아요 -
- - ) -} \ No newline at end of file + const [isFeedSelected, setIsFeedSelected] = useState(true) + + const handleFeedClike = () => { + setIsFeedSelected(true) + } + + const handleLikeClick = () => { + setIsFeedSelected(false) + } + + return ( + <> +
+ + 피드 + + + 좋아요 + +
+ + ) +} diff --git a/weatherfit_refactoring/src/app/mypage/page.tsx b/weatherfit_refactoring/src/app/mypage/page.tsx index 516ce85..b8f0617 100644 --- a/weatherfit_refactoring/src/app/mypage/page.tsx +++ b/weatherfit_refactoring/src/app/mypage/page.tsx @@ -9,11 +9,8 @@ export default function Mypage() { return ( <> -
-
-
) diff --git a/weatherfit_refactoring/src/app/page.tsx b/weatherfit_refactoring/src/app/page.tsx index e4f1ef7..2694d61 100644 --- a/weatherfit_refactoring/src/app/page.tsx +++ b/weatherfit_refactoring/src/app/page.tsx @@ -9,6 +9,7 @@ export default function Home() {