From 659f7cde6c08a0b8c90aa78e9f7c19e9749c7fce Mon Sep 17 00:00:00 2001 From: yeokyoung song Date: Tue, 19 Mar 2024 00:50:47 +0900 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20=EB=A1=9C=EB=94=A9=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=9A=B0=EC=B8=A1=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/loading/index.tsx | 4 +++- pages/welcome/index.tsx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/loading/index.tsx b/components/loading/index.tsx index 5ba5007..ef6e81d 100644 --- a/components/loading/index.tsx +++ b/components/loading/index.tsx @@ -39,7 +39,9 @@ const Loading = () => { /> - +
+
) } diff --git a/pages/welcome/index.tsx b/pages/welcome/index.tsx index a9f54e6..bbc518d 100644 --- a/pages/welcome/index.tsx +++ b/pages/welcome/index.tsx @@ -1,5 +1,5 @@ import Button from '@/components/button' -import WelcomeTrees from '@/components/icons/welcome-trees' + import MetaHead from '@/components/meta-head' import Modal from '@/components/modal' import FormLayout from '@/layout/form-layout' @@ -67,7 +67,7 @@ const WelcomePage = () => { className="fixed top-0 left-0 z-10 w-full bg-white" content={
- + welcome

환영해요 {data?.user?.name}님

From 3cf0c5f728ce41b4e31bb2d84d675eaf429b6025 Mon Sep 17 00:00:00 2001 From: yeokyoung song Date: Thu, 21 Mar 2024 00:26:06 +0900 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=ED=95=84=EC=9A=94=20=EC=97=90?= =?UTF-8?q?=EC=85=8B=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/eye.svg | 4 ++++ assets/menu.svg | 5 +++++ assets/pen.svg | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 assets/eye.svg create mode 100644 assets/menu.svg create mode 100644 assets/pen.svg diff --git a/assets/eye.svg b/assets/eye.svg new file mode 100644 index 0000000..f46290d --- /dev/null +++ b/assets/eye.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/menu.svg b/assets/menu.svg new file mode 100644 index 0000000..dace86f --- /dev/null +++ b/assets/menu.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/pen.svg b/assets/pen.svg new file mode 100644 index 0000000..29fb7d1 --- /dev/null +++ b/assets/pen.svg @@ -0,0 +1,4 @@ + + + + From 90fcd09cbf7ca909f5ae7c80ec3034b8aec040ad Mon Sep 17 00:00:00 2001 From: yeokyoung song Date: Thu, 21 Mar 2024 00:26:56 +0900 Subject: [PATCH 3/7] =?UTF-8?q?feat:=20surveyWikiId=20props=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80,=20treecard=20=EB=B3=80=EA=B2=BD=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/compositions/tree-card/index.tsx | 17 +++++------------ model/survey.entity.ts | 1 + 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/components/compositions/tree-card/index.tsx b/components/compositions/tree-card/index.tsx index 61f29f0..a513069 100644 --- a/components/compositions/tree-card/index.tsx +++ b/components/compositions/tree-card/index.tsx @@ -4,6 +4,7 @@ import Link from 'next/link' import { motion } from 'framer-motion' import { useRef } from 'react' import { fadeInProps } from '@/variants' +import BottomSheetButton from '@/components/bottom-sheet-button' interface TreeCardProps { period: string @@ -12,6 +13,7 @@ interface TreeCardProps { onClick: () => void id: string senderName: string + senderWikiId: string } const TreeCard = ({ @@ -20,6 +22,7 @@ const TreeCard = ({ relation, isFlipped, senderName, + senderWikiId, onClick, }: TreeCardProps) => { const bgColor = (() => { @@ -44,9 +47,6 @@ const TreeCard = ({ const handleCardClick = () => { onClick() } - const handleLinkClick = (e: any) => { - e.stopPropagation() - } return (
+
+ {senderName} - - -
diff --git a/model/survey.entity.ts b/model/survey.entity.ts index 209ab28..0bc7e6f 100644 --- a/model/survey.entity.ts +++ b/model/survey.entity.ts @@ -17,4 +17,5 @@ export interface Survey { relation: Relation period: Period senderName: string + senderWikiId: string } From a62d3505a89315075db2a588d1e3159b7c27ea32 Mon Sep 17 00:00:00 2001 From: yeokyoung song Date: Thu, 21 Mar 2024 00:27:57 +0900 Subject: [PATCH 4/7] =?UTF-8?q?feat:=20=EB=8D=94=EB=B3=B4=EA=B8=B0=20?= =?UTF-8?q?=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bottomsheet-button/index.tsx | 79 +++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 components/bottomsheet-button/index.tsx diff --git a/components/bottomsheet-button/index.tsx b/components/bottomsheet-button/index.tsx new file mode 100644 index 0000000..986d0c1 --- /dev/null +++ b/components/bottomsheet-button/index.tsx @@ -0,0 +1,79 @@ +import { useState } from 'react' +import Link from 'next/link' +import { Drawer, DrawerContent } from '../ui/drawer' +import Image from 'next/image' +import pen from '@/assets/pen.svg' +import eye from '@/assets/eye.svg' +import menu from '@/assets/menu.svg' + +interface BottomSheetButtonProps { + id: string + senderWikiId: string +} + +const BottomSheetButton = ({ id, senderWikiId }: BottomSheetButtonProps) => { + const [bottomSheet, setBottomSheet] = useState({ + isOpen: false, + }) + + const toggleBottomSheet = (e) => { + setBottomSheet((prev) => ({ + ...prev, + isOpen: !prev.isOpen, + })) + e.stopPropagation() + } + + const handleLinkClick = (e: any) => { + e.stopPropagation() + } + + return ( + <> + + + setBottomSheet((prev) => ({ + ...prev, + isOpen: open, + })) + } + > + +
+
+ + + + + + +
+
+
+
+ + ) +} + +export default BottomSheetButton From 0cf2c32706be31af4913f9764ee3e40a7a974d2f Mon Sep 17 00:00:00 2001 From: yeokyoung song Date: Thu, 21 Mar 2024 00:31:13 +0900 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20=EB=8D=94=EB=B3=B4=EA=B8=B0=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 자세히 보기 해당 버튼 내부 기능으로 이동 - 나도 써주기 기능 추가 --- components/bottom-sheet/index.tsx | 30 --------------------- components/compositions/tree-card/index.tsx | 2 +- pages/garden/index.tsx | 2 ++ 3 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 components/bottom-sheet/index.tsx diff --git a/components/bottom-sheet/index.tsx b/components/bottom-sheet/index.tsx deleted file mode 100644 index f0bf77d..0000000 --- a/components/bottom-sheet/index.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { useState } from 'react' -import { Drawer, DrawerContent } from '../ui/drawer' - -const BottomSheet = () => { - const [bottomSheet, setBottomSheet] = useState({ - isOpen: false, - }) - - return ( - - setBottomSheet((prev) => ({ - ...prev, - isOpen: open, - })) - } - > - -
-

- GRRREW Team -

-
-
-
- ) -} - -export default BottomSheet diff --git a/components/compositions/tree-card/index.tsx b/components/compositions/tree-card/index.tsx index a513069..efa1e70 100644 --- a/components/compositions/tree-card/index.tsx +++ b/components/compositions/tree-card/index.tsx @@ -4,7 +4,7 @@ import Link from 'next/link' import { motion } from 'framer-motion' import { useRef } from 'react' import { fadeInProps } from '@/variants' -import BottomSheetButton from '@/components/bottom-sheet-button' +import BottomSheetButton from '@/components/bottomsheet-button' interface TreeCardProps { period: string diff --git a/pages/garden/index.tsx b/pages/garden/index.tsx index f6a0d60..d5631bc 100644 --- a/pages/garden/index.tsx +++ b/pages/garden/index.tsx @@ -16,6 +16,7 @@ import ShareModal from '@/components/share-modal' import InfoIcon from '@/components/svgs/info-icon' import WriteList from '@/components/compositions/header/write-list' import { FilterProvider } from '@/hooks/use-filter' +import BottomSheet from '@/components/bottomsheet-button' const Pages = () => { const { data } = useSession() @@ -196,6 +197,7 @@ const Pages = () => { page.data.content.map((item, index) => ( Date: Thu, 21 Mar 2024 19:06:21 +0900 Subject: [PATCH 6/7] =?UTF-8?q?feat:=20=EB=B9=84=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20=EB=AA=A8=EB=8B=AC=20alert=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bottomsheet-button/index.tsx | 59 ++++++++++++++++++++----- components/modal/index.tsx | 8 +--- 2 files changed, 49 insertions(+), 18 deletions(-) diff --git a/components/bottomsheet-button/index.tsx b/components/bottomsheet-button/index.tsx index 986d0c1..b06f7ed 100644 --- a/components/bottomsheet-button/index.tsx +++ b/components/bottomsheet-button/index.tsx @@ -1,22 +1,24 @@ -import { useState } from 'react' +import { useRef, useState } from 'react' import Link from 'next/link' import { Drawer, DrawerContent } from '../ui/drawer' import Image from 'next/image' import pen from '@/assets/pen.svg' import eye from '@/assets/eye.svg' import menu from '@/assets/menu.svg' +import Modal from '../modal' interface BottomSheetButtonProps { id: string - senderWikiId: string + senderWikiId: string | null } const BottomSheetButton = ({ id, senderWikiId }: BottomSheetButtonProps) => { const [bottomSheet, setBottomSheet] = useState({ isOpen: false, }) + const [modalOpen, setModalOpen] = useState(false) - const toggleBottomSheet = (e) => { + const toggleBottomSheet = (e: any) => { setBottomSheet((prev) => ({ ...prev, isOpen: !prev.isOpen, @@ -25,14 +27,32 @@ const BottomSheetButton = ({ id, senderWikiId }: BottomSheetButtonProps) => { } const handleLinkClick = (e: any) => { + if (senderWikiId === null) { + e.preventDefault() + } else { + e.stopPropagation() + } + } + + const handleDetailClick = (e: any) => { e.stopPropagation() } + const handleWritingClick = (e: any) => { + if (senderWikiId === null) { + setModalOpen(true) + } else { + setBottomSheet((prev) => ({ + ...prev, + isOpen: false, + })) + } + } + return ( <> - - @@ -72,6 +94,21 @@ const BottomSheetButton = ({ id, senderWikiId }: BottomSheetButtonProps) => { + { + setModalOpen(state) + }} + title="" + description={ + + 비회원으로 작성해서 +
+ 친구에게 소개서를 써줄 수 없어요 +
+ } + trigger={null} + /> ) } diff --git a/components/modal/index.tsx b/components/modal/index.tsx index 9fc29d5..bb5927b 100644 --- a/components/modal/index.tsx +++ b/components/modal/index.tsx @@ -44,15 +44,9 @@ export const Modal = forwardRef>( key="cancel" className="flex-1 py-[14px] px-4 text-brand-sub1-blue600 bg-transparent rounded-none active:bg-bg-gray1 duration-150" > - 취소 + 확인 Close , - , ], }, ...rest From c671ad70d91a123a5f137eaddf45981b842e2119 Mon Sep 17 00:00:00 2001 From: yeokyoung song Date: Thu, 21 Mar 2024 19:14:41 +0900 Subject: [PATCH 7/7] =?UTF-8?q?feat:=20=EC=98=A8=EB=B3=B4=EB=94=A9=20?= =?UTF-8?q?=EB=82=B4=20senderWikiId=20props=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bottomsheet-button/index.tsx | 2 +- components/onboard/onboard-step2/index.tsx | 8 ++++++++ public/sitemap-0.xml | 24 +++++++++++----------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/components/bottomsheet-button/index.tsx b/components/bottomsheet-button/index.tsx index b06f7ed..44b8513 100644 --- a/components/bottomsheet-button/index.tsx +++ b/components/bottomsheet-button/index.tsx @@ -1,4 +1,4 @@ -import { useRef, useState } from 'react' +import { useState } from 'react' import Link from 'next/link' import { Drawer, DrawerContent } from '../ui/drawer' import Image from 'next/image' diff --git a/components/onboard/onboard-step2/index.tsx b/components/onboard/onboard-step2/index.tsx index a35c4c7..95b744d 100644 --- a/components/onboard/onboard-step2/index.tsx +++ b/components/onboard/onboard-step2/index.tsx @@ -21,36 +21,42 @@ const surveys: InfiniteData = { relation: 'MIDDLE_AND_HIGH_SCHOOL', senderName: '디엔이', surveyId: '', + senderWikiId: '', }, { period: 'ONE_YEAR', relation: 'WORK', senderName: '디엔이', surveyId: '', + senderWikiId: '', }, { period: 'FOUR_YEARS', relation: 'ETC', senderName: '디엔이', surveyId: '', + senderWikiId: '', }, { period: 'INFINITE', relation: 'ELEMENTARY_SCHOOL', senderName: '디엔이', surveyId: '', + senderWikiId: '', }, { period: 'SIX_MONTHS', relation: 'SOCIAL', senderName: '디엔이', surveyId: '', + senderWikiId: '', }, { period: 'ONE_YEAR', relation: 'WORK', senderName: '디엔이', surveyId: '', + senderWikiId: '', }, ], }, @@ -161,6 +167,7 @@ const OnboardStep2 = () => { item ? ( { > {page.data.content.map((item, index) => ( -http://namui-wiki.life2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/answers2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/csrf2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/dashboard2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/garden2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/login2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/onboard2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/signup2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/submit2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/surveys2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/surveys/questions2024-03-21T09:08:49.209Zdaily0.7 -http://namui-wiki.life/welcome2024-03-21T09:08:49.209Zdaily0.7 +http://namui-wiki.life2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/answers2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/csrf2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/dashboard2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/garden2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/login2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/onboard2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/signup2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/submit2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/surveys2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/surveys/questions2024-03-21T10:14:20.216Zdaily0.7 +http://namui-wiki.life/welcome2024-03-21T10:14:20.216Zdaily0.7 \ No newline at end of file