From df64e04a2aacd1ddf62d3e7e829398d63fa972f7 Mon Sep 17 00:00:00 2001 From: LMS10 Date: Mon, 17 Feb 2025 02:15:22 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=92=84=20design=20:=20=EC=A0=84?= =?UTF-8?q?=EC=97=AD=20=EC=BB=A4=EC=8A=A4=ED=85=80=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4=EB=B0=94=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/globals.css | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/app/globals.css b/src/app/globals.css index 556b809..c754a02 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -10,6 +10,23 @@ body { min-width: 375px; } +@layer base { + * { + @apply custom-scrollbar; + } + .custom-scrollbar::-webkit-scrollbar { + width: 8px; + } + .custom-scrollbar::-webkit-scrollbar-thumb { + background-color: #CFDBEA; + border-radius: 4px; + } + .custom-scrollbar::-webkit-scrollbar-track { + background-color: #F2F4F8; + border-radius: 4px; + } +} + @layer utilities { .line-clamp-2 { display: -webkit-box; From c91d16a4b7e098c2aa1067b24731e43c007d1bbb Mon Sep 17 00:00:00 2001 From: LMS10 Date: Mon, 17 Feb 2025 02:21:51 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=92=84=20design=20:=20=EB=AA=A8?= =?UTF-8?q?=EB=8B=AC=EC=9D=80=20=EB=AA=A8=EB=8B=AC=20=EB=82=B4=EB=B6=80?= =?UTF-8?q?=EB=A1=9C=20=EC=BB=A4=EC=8A=A4=ED=85=80=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4=EB=B0=94=20=EB=B3=84=EB=8F=84=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/MyReviewKebabDropDown.tsx | 10 +- .../_components/MyWIneKebabDropDown .tsx | 6 +- .../wines/[id]/_components/ReviewDropdown.tsx | 12 +- .../wines/_components/WineFilterModal.tsx | 8 +- src/components/modal/PostReviewModal.tsx | 126 +++++++++------ src/components/modal/PostWineModal.tsx | 152 +++++++++--------- 6 files changed, 170 insertions(+), 144 deletions(-) diff --git a/src/app/(with-header)/myprofile/_components/MyReviewKebabDropDown.tsx b/src/app/(with-header)/myprofile/_components/MyReviewKebabDropDown.tsx index 7c14af9..0c29b1f 100644 --- a/src/app/(with-header)/myprofile/_components/MyReviewKebabDropDown.tsx +++ b/src/app/(with-header)/myprofile/_components/MyReviewKebabDropDown.tsx @@ -4,13 +4,13 @@ import { useState } from 'react'; import Image from 'next/image'; import { toast } from 'react-toastify'; import Dropdown from '@/components/Dropdown'; -import kebab from '@/assets/icons/menu.svg'; import Modal from '@/components/modal/Modal'; -import DeleteWineForm from '@/components/modal/DeleteWineModal'; import PatchReviewForm from '@/components/modal/PatchReviewForm'; +import DeleteWineForm from '@/components/modal/DeleteWineModal'; import { MyReview } from '@/types/review-data'; import { fetchDeleteReview } from '@/lib/fetchMyReivew'; import { EditReviewData } from '@/app/(with-header)/myprofile/_components/MyReviewListContainer'; +import kebab from '@/assets/icons/menu.svg'; export default function MyReviewKebabDropDown({ reviewInitialData, @@ -81,11 +81,13 @@ export default function MyReviewKebabDropDown({ - +
+ +
diff --git a/src/app/(with-header)/myprofile/_components/MyWIneKebabDropDown .tsx b/src/app/(with-header)/myprofile/_components/MyWIneKebabDropDown .tsx index 6ef3073..228915d 100644 --- a/src/app/(with-header)/myprofile/_components/MyWIneKebabDropDown .tsx +++ b/src/app/(with-header)/myprofile/_components/MyWIneKebabDropDown .tsx @@ -4,11 +4,11 @@ import { useState } from 'react'; import Image from 'next/image'; import { toast } from 'react-toastify'; import Dropdown from '@/components/Dropdown'; -import kebab from '@/assets/icons/menu.svg'; import Modal from '@/components/modal/Modal'; import PatchWineForm from '@/components/modal/PatchWineForm'; import DeleteWineForm from '@/components/modal/DeleteWineModal'; import { fetchDeleteWine } from '@/lib/fetchWines'; +import kebab from '@/assets/icons/menu.svg'; export interface WineDataProps { name: string; @@ -89,7 +89,9 @@ export default function MyWIneKebabDropDown({ isEditModalOpen ? 'mobile:translate-y-0 mobile:animate-slide-up' : 'mobile:animate-slide-down mobile:translate-y-full' }`} > - +
+ +
diff --git a/src/app/(with-header)/wines/[id]/_components/ReviewDropdown.tsx b/src/app/(with-header)/wines/[id]/_components/ReviewDropdown.tsx index 4c1c8b5..8b132c1 100644 --- a/src/app/(with-header)/wines/[id]/_components/ReviewDropdown.tsx +++ b/src/app/(with-header)/wines/[id]/_components/ReviewDropdown.tsx @@ -1,9 +1,9 @@ 'use client'; -import Image from 'next/image'; + import { useState } from 'react'; +import Image from 'next/image'; import { fetchWithAuth } from '@/lib/auth'; -import { MyReview } from '@/types/review-data'; -import { EditReviewData } from '@/types/review-data'; +import { MyReview, EditReviewData } from '@/types/review-data'; import { toast } from 'react-toastify'; import Dropdown from '@/components/Dropdown'; import Modal from '@/components/modal/Modal'; @@ -86,11 +86,13 @@ export default function ReviewDropdown({ - +
+ +
diff --git a/src/app/(with-header)/wines/_components/WineFilterModal.tsx b/src/app/(with-header)/wines/_components/WineFilterModal.tsx index 036f4c6..70f77d7 100644 --- a/src/app/(with-header)/wines/_components/WineFilterModal.tsx +++ b/src/app/(with-header)/wines/_components/WineFilterModal.tsx @@ -6,6 +6,7 @@ import FilterTypes from './FilterTypes'; import FilterPrice from './FilterPrice'; import FilterRating from './FilterRating'; import Button from '@/components/Button'; +import { useScrollLock } from '@/hooks/useScrollLock'; import closeIcon from '@/assets/icons/close.svg'; const MAX_PRICE = 2000000; @@ -46,12 +47,7 @@ export default function WineFilterModal({ isOpen, onClose, onApply, onFilterChan onFilterChange({ type: selectedType, minPrice: priceRange[0], maxPrice: priceRange[1], rating: selectedRating }); }, [selectedType, priceRange, selectedRating, onFilterChange]); - useEffect(() => { - document.body.style.overflow = isOpen ? 'hidden' : 'auto'; - return () => { - document.body.style.overflow = 'auto'; - }; - }, [isOpen]); + useScrollLock(isOpen); const handleKeyDown = useCallback( (event: KeyboardEvent) => { diff --git a/src/components/modal/PostReviewModal.tsx b/src/components/modal/PostReviewModal.tsx index 2a07465..ae5f6e5 100644 --- a/src/components/modal/PostReviewModal.tsx +++ b/src/components/modal/PostReviewModal.tsx @@ -213,66 +213,88 @@ export default function PostReviewModal({ addReview }: { addReview: (newReview: -
-
-

리뷰 등록

- -
-
-
-
-
- 와인 이미지 -
-

{wineData.name}

- setValue('rating', rate)} /> +
+
+
+

리뷰 등록

+ +
+ +
+
+
+ 와인 이미지 +
+

{wineData.name}

+ setValue('rating', rate)} /> +
+