From fc71cf5297683c60bf70ed83f3f01e59cc124626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=8C=EC=9A=B8=EC=B9=98=ED=82=A8?= <90738604+soulchicken@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:23:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Feat:=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1=EC=97=90=20=EC=82=AC=EC=9A=A9=ED=95=A0=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98=20=EC=A0=9C=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/icons/PostWriteIcon.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/components/icons/PostWriteIcon.tsx diff --git a/src/components/icons/PostWriteIcon.tsx b/src/components/icons/PostWriteIcon.tsx new file mode 100644 index 0000000..0c510a1 --- /dev/null +++ b/src/components/icons/PostWriteIcon.tsx @@ -0,0 +1,11 @@ +import { FC } from 'react'; +import { IconProps } from '@/types/icon'; + +const PostWriteIcon: FC = ({ color }) => ( + + + + +); + +export default PostWriteIcon; From 891c3c27c7ba8a6bccb7db05aa62f6d89d92dc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=8C=EC=9A=B8=EC=B9=98=ED=82=A8?= <90738604+soulchicken@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:46:57 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Feat:=20=EA=B8=80=EC=93=B0=EA=B8=B0=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/community/WriteButton.tsx | 49 ++++++++++++++++++++ src/pages/community/[character_id]/index.tsx | 2 + 2 files changed, 51 insertions(+) create mode 100644 src/components/community/WriteButton.tsx diff --git a/src/components/community/WriteButton.tsx b/src/components/community/WriteButton.tsx new file mode 100644 index 0000000..e59851a --- /dev/null +++ b/src/components/community/WriteButton.tsx @@ -0,0 +1,49 @@ +import color from '@/styles/color'; +import PostWriteIcon from '@/components/icons/PostWriteIcon'; +import { css } from '@emotion/react'; + +const WriteButton = () => { + const buttonHandler = () => { + console.log(1); + }; + + return ( + + ); +}; + +export default WriteButton; + +const buttonCSS = css` + position: fixed; + top: 80%; + left: 50%; + transform: translate(-50%, -50%); + width: 10rem; + z-index: 5; + + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: 1rem; + + padding: 0.5rem; + border: none; + border-radius: 1rem; + + background-color: ${color.offWhite}; + color: ${color.black}; + + &:active, &:hover { + background-color: ${color.lightGray}; + } + +`; + +const textCSS = css` + font-size: 1rem; +`; diff --git a/src/pages/community/[character_id]/index.tsx b/src/pages/community/[character_id]/index.tsx index c2a6158..b493b1a 100644 --- a/src/pages/community/[character_id]/index.tsx +++ b/src/pages/community/[character_id]/index.tsx @@ -3,12 +3,14 @@ import BottomNavBar from '@/components/common/bottomNavBar/BottomNavBar'; import SEO from '@/components/common/head/SEO'; import PostList from '@/components/community/PostList'; import CommunityHeader from '@/components/community/CommunityHeader'; +import WriteButton from '@/components/community/WriteButton'; const Board = () => ( <>
+
From 116f42a574b69c383274edb00c01bec04fafe38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=8C=EC=9A=B8=EC=B9=98=ED=82=A8?= <90738604+soulchicken@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:53:17 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Feat:=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1=20=EB=B2=84=ED=8A=BC=EB=88=84=EB=A5=B4?= =?UTF-8?q?=EB=A9=B4=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=9E=91=EC=84=B1=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EB=9D=BC=EC=9A=B0?= =?UTF-8?q?=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/community/PostHeader.tsx | 2 +- src/components/community/WriteButton.tsx | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/community/PostHeader.tsx b/src/components/community/PostHeader.tsx index 61835e8..0ce6c29 100644 --- a/src/components/community/PostHeader.tsx +++ b/src/components/community/PostHeader.tsx @@ -28,7 +28,7 @@ const PostHeader = () => { characterInfo ? ( { + const router = useRouter(); + const { character_id: characterId } = router.query; + const buttonHandler = () => { - console.log(1); + if (characterId && typeof characterId === 'string') { + router.push(`/community/${characterId}/edit`); + } }; return (