diff --git a/public/PostImage.svg b/public/PostImage.svg deleted file mode 100644 index 96cfc4be..00000000 --- a/public/PostImage.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/public/PostImage2.svg b/public/PostImage2.svg deleted file mode 100644 index 876f69e5..00000000 --- a/public/PostImage2.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/PostImage3.svg b/public/PostImage3.svg deleted file mode 100644 index a58c9ae2..00000000 --- a/public/PostImage3.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/google-icon.svg b/public/auth/google-icon.svg similarity index 100% rename from public/google-icon.svg rename to public/auth/google-icon.svg diff --git a/public/kakao-icon.svg b/public/auth/kakao-icon.svg similarity index 100% rename from public/kakao-icon.svg rename to public/auth/kakao-icon.svg diff --git a/public/auth_brand_image.svg b/public/auth_brand_image.svg deleted file mode 100644 index fefa6693..00000000 --- a/public/auth_brand_image.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/banner-image1.png b/public/banner-image1.png deleted file mode 100644 index 73cada2f..00000000 Binary files a/public/banner-image1.png and /dev/null differ diff --git a/public/banner-image2.png b/public/banner-image2.png deleted file mode 100644 index 746993b3..00000000 Binary files a/public/banner-image2.png and /dev/null differ diff --git a/public/banner-image3.png b/public/banner-image3.png deleted file mode 100644 index c6a4100d..00000000 Binary files a/public/banner-image3.png and /dev/null differ diff --git a/public/banner2-image.svg b/public/banner2-image.svg deleted file mode 100644 index 2d8491e3..00000000 --- a/public/banner2-image.svg +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/bookmark-icon-marked.svg b/public/common/bookmark-icon-marked.svg similarity index 100% rename from public/bookmark-icon-marked.svg rename to public/common/bookmark-icon-marked.svg diff --git a/public/bookmark-icon.svg b/public/common/bookmark-icon.svg similarity index 100% rename from public/bookmark-icon.svg rename to public/common/bookmark-icon.svg diff --git a/public/eyes-icon.svg b/public/common/eyes-icon.svg similarity index 100% rename from public/eyes-icon.svg rename to public/common/eyes-icon.svg diff --git a/public/home-icon.svg b/public/common/home-icon.svg similarity index 100% rename from public/home-icon.svg rename to public/common/home-icon.svg diff --git a/public/loading-icon.png b/public/common/loading-icon.png similarity index 100% rename from public/loading-icon.png rename to public/common/loading-icon.png diff --git a/public/pencil-icon.png b/public/common/pencil-icon.png similarity index 100% rename from public/pencil-icon.png rename to public/common/pencil-icon.png diff --git a/public/search-icon.png b/public/common/search-icon.png similarity index 100% rename from public/search-icon.png rename to public/common/search-icon.png diff --git a/public/Solitour-logo.svg b/public/common/solitour-logo.svg similarity index 100% rename from public/Solitour-logo.svg rename to public/common/solitour-logo.svg diff --git a/public/day-text-dark-mode.svg b/public/day-text-dark-mode.svg deleted file mode 100644 index e717a5cd..00000000 --- a/public/day-text-dark-mode.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/diary-image1.svg b/public/diary-image1.svg deleted file mode 100644 index 44685c62..00000000 --- a/public/diary-image1.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/diary-image2.svg b/public/diary-image2.svg deleted file mode 100644 index 819af903..00000000 --- a/public/diary-image2.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/day-text.svg b/public/diary/day-text.svg similarity index 100% rename from public/day-text.svg rename to public/diary/day-text.svg diff --git a/public/mood-icon1.svg b/public/diary/mood-icon1.svg similarity index 100% rename from public/mood-icon1.svg rename to public/diary/mood-icon1.svg diff --git a/public/mood-icon2.svg b/public/diary/mood-icon2.svg similarity index 100% rename from public/mood-icon2.svg rename to public/diary/mood-icon2.svg diff --git a/public/mood-icon3.svg b/public/diary/mood-icon3.svg similarity index 100% rename from public/mood-icon3.svg rename to public/diary/mood-icon3.svg diff --git a/public/mood-icon4.svg b/public/diary/mood-icon4.svg similarity index 100% rename from public/mood-icon4.svg rename to public/diary/mood-icon4.svg diff --git a/public/mood-icon5.svg b/public/diary/mood-icon5.svg similarity index 100% rename from public/mood-icon5.svg rename to public/diary/mood-icon5.svg diff --git a/public/pencil-green-icon.svg b/public/diary/pencil-green-icon.svg similarity index 100% rename from public/pencil-green-icon.svg rename to public/diary/pencil-green-icon.svg diff --git a/public/error_sign.svg b/public/error/error_sign.svg similarity index 100% rename from public/error_sign.svg rename to public/error/error_sign.svg diff --git a/public/example/diary/detail/diary-image1.svg b/public/example/diary/detail/diary-image1.svg deleted file mode 100644 index d98dbe43..00000000 --- a/public/example/diary/detail/diary-image1.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/public/example/diary/detail/diary-image2.svg b/public/example/diary/detail/diary-image2.svg deleted file mode 100644 index 65f80068..00000000 --- a/public/example/diary/detail/diary-image2.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/example/diary/detail/diary-image3.svg b/public/example/diary/detail/diary-image3.svg deleted file mode 100644 index c9e7474a..00000000 --- a/public/example/diary/detail/diary-image3.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/calendar-gray-icon.svg b/public/gathering/calendar-gray-icon.svg similarity index 100% rename from public/calendar-gray-icon.svg rename to public/gathering/calendar-gray-icon.svg diff --git a/public/calendar-icon.svg b/public/gathering/calendar-icon.svg similarity index 100% rename from public/calendar-icon.svg rename to public/gathering/calendar-icon.svg diff --git a/public/clock-gray-icon.svg b/public/gathering/clock-gray-icon.svg similarity index 100% rename from public/clock-gray-icon.svg rename to public/gathering/clock-gray-icon.svg diff --git a/public/clock-icon.svg b/public/gathering/clock-icon.svg similarity index 100% rename from public/clock-icon.svg rename to public/gathering/clock-icon.svg diff --git a/public/close-icon.svg b/public/gathering/close-icon.svg similarity index 100% rename from public/close-icon.svg rename to public/gathering/close-icon.svg diff --git a/public/location-gray-icon.svg b/public/gathering/location-gray-icon.svg similarity index 100% rename from public/location-gray-icon.svg rename to public/gathering/location-gray-icon.svg diff --git a/public/location-icon.svg b/public/gathering/location-icon.svg similarity index 100% rename from public/location-icon.svg rename to public/gathering/location-icon.svg diff --git a/public/minus-icon.svg b/public/gathering/minus-icon.svg similarity index 100% rename from public/minus-icon.svg rename to public/gathering/minus-icon.svg diff --git a/public/people-gray-icon.svg b/public/gathering/people-gray-icon.svg similarity index 100% rename from public/people-gray-icon.svg rename to public/gathering/people-gray-icon.svg diff --git a/public/people-icon.svg b/public/gathering/people-icon.svg similarity index 100% rename from public/people-icon.svg rename to public/gathering/people-icon.svg diff --git a/public/pin-gray-icon.svg b/public/gathering/pin-gray-icon.svg similarity index 100% rename from public/pin-gray-icon.svg rename to public/gathering/pin-gray-icon.svg diff --git a/public/pin-icon.svg b/public/gathering/pin-icon.svg similarity index 100% rename from public/pin-icon.svg rename to public/gathering/pin-icon.svg diff --git a/public/plus-icon.svg b/public/gathering/plus-icon.svg similarity index 100% rename from public/plus-icon.svg rename to public/gathering/plus-icon.svg diff --git a/public/search-icon.svg b/public/gathering/search-icon.svg similarity index 100% rename from public/search-icon.svg rename to public/gathering/search-icon.svg diff --git a/public/background1.png b/public/home/background1.png similarity index 100% rename from public/background1.png rename to public/home/background1.png diff --git a/public/background2.png b/public/home/background2.png similarity index 100% rename from public/background2.png rename to public/home/background2.png diff --git a/public/background3.png b/public/home/background3.png similarity index 100% rename from public/background3.png rename to public/home/background3.png diff --git a/public/background4.png b/public/home/background4.png similarity index 100% rename from public/background4.png rename to public/home/background4.png diff --git a/public/Trip-search-icon.svg b/public/home/trip-search-icon.svg similarity index 100% rename from public/Trip-search-icon.svg rename to public/home/trip-search-icon.svg diff --git a/public/banner-image.png b/public/information/banner-image.png similarity index 100% rename from public/banner-image.png rename to public/information/banner-image.png diff --git a/public/loading.png b/public/loading.png deleted file mode 100644 index 7373e639..00000000 Binary files a/public/loading.png and /dev/null differ diff --git a/public/camera-icon.svg b/public/mypage/camera-icon.svg similarity index 100% rename from public/camera-icon.svg rename to public/mypage/camera-icon.svg diff --git a/public/setting-icon.svg b/public/mypage/setting-icon.svg similarity index 100% rename from public/setting-icon.svg rename to public/mypage/setting-icon.svg diff --git a/public/next.svg b/public/next.svg deleted file mode 100644 index 5174b28c..00000000 --- a/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/404.svg b/public/not-found/404.svg similarity index 100% rename from public/404.svg rename to public/not-found/404.svg diff --git a/public/pin-icon.png b/public/pin-icon.png deleted file mode 100644 index ebc2979a..00000000 Binary files a/public/pin-icon.png and /dev/null differ diff --git a/public/restaurant1.svg b/public/restaurant1.svg deleted file mode 100644 index aecfdbde..00000000 --- a/public/restaurant1.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/public/restaurant2.svg b/public/restaurant2.svg deleted file mode 100644 index c16307c1..00000000 --- a/public/restaurant2.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/public/restaurant3.svg b/public/restaurant3.svg deleted file mode 100644 index e53e256f..00000000 --- a/public/restaurant3.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/public/restaurant4.svg b/public/restaurant4.svg deleted file mode 100644 index 98868de6..00000000 --- a/public/restaurant4.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/public/restaurant5.svg b/public/restaurant5.svg deleted file mode 100644 index 3929b4e7..00000000 --- a/public/restaurant5.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/public/restaurant6.svg b/public/restaurant6.svg deleted file mode 100644 index cc70e7ab..00000000 --- a/public/restaurant6.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/public/restaurant7.svg b/public/restaurant7.svg deleted file mode 100644 index 6223c8c4..00000000 --- a/public/restaurant7.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/public/restaurant8.svg b/public/restaurant8.svg deleted file mode 100644 index 58750d10..00000000 --- a/public/restaurant8.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/public/search-icon-dark-mode.png b/public/search-icon-dark-mode.png deleted file mode 100644 index ca138c2a..00000000 Binary files a/public/search-icon-dark-mode.png and /dev/null differ diff --git a/public/solitour-logo-dark-mode.png b/public/solitour-logo-dark-mode.png deleted file mode 100644 index d82d6e2e..00000000 Binary files a/public/solitour-logo-dark-mode.png and /dev/null differ diff --git a/public/test.png b/public/test.png deleted file mode 100644 index 55a4a323..00000000 Binary files a/public/test.png and /dev/null differ diff --git a/public/user_sex_man_default_image.svg b/public/user_sex_man_default_image.svg deleted file mode 100644 index b73b3545..00000000 --- a/public/user_sex_man_default_image.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/user_sex_woman_default_image.svg b/public/user_sex_woman_default_image.svg deleted file mode 100644 index 0ed4814c..00000000 --- a/public/user_sex_woman_default_image.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index d2f84222..00000000 --- a/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/error.tsx b/src/app/error.tsx index 89352c75..793561ea 100644 --- a/src/app/error.tsx +++ b/src/app/error.tsx @@ -15,16 +15,16 @@ const Error = () => {
-

+

앗..오류가 발생하였습니다.

-
+

시스템에 오류가 발생하였습니다.

잠시 후에 다시 시도해 주세요.

홈으로 @@ -35,7 +35,7 @@ const Error = () => {
error_sign {
404 { href="/api/auth/kakao" >
- {"kakao-logo-image"} + {"kakao-logo-image"}
카카오로 로그인 @@ -48,7 +52,7 @@ const SignIn = () => { >
{"google-logo-image"} diff --git a/src/components/auth/SignUp.tsx b/src/components/auth/SignUp.tsx index 52bbeb9d..9637a28a 100644 --- a/src/components/auth/SignUp.tsx +++ b/src/components/auth/SignUp.tsx @@ -34,7 +34,11 @@ const SignUp = () => { href="/api/auth/kakao" >
- {"kakao-logo-image"} + {"kakao-logo-image"}
카카오로 1초만에 시작하기 @@ -48,7 +52,7 @@ const SignUp = () => { >
{"google-logo-image"} diff --git a/src/components/common/Banner.tsx b/src/components/common/Banner.tsx index e4c0451f..4c4f5a97 100644 --- a/src/components/common/Banner.tsx +++ b/src/components/common/Banner.tsx @@ -58,7 +58,7 @@ const Banner = ({ content, buttonText, category }: Props) => {
banner-image diff --git a/src/components/common/Breadcrumb.tsx b/src/components/common/Breadcrumb.tsx index c56e9661..5794fe8f 100644 --- a/src/components/common/Breadcrumb.tsx +++ b/src/components/common/Breadcrumb.tsx @@ -18,7 +18,7 @@ const Breadcrumbs: FC = ({ categories }) => {
{"home-icon-image"} { > pencil-icon {
{"/background"} {
{/* 모임 기간 */} calendar-icon { {/* 모임 장소 */}
location-icon {
{/* 모임 인원 */} people-icon {
{/* 모임 시간 */} clock-icon {
pin-icon { )}
eyes-icon {
{/* 모임 기간 */} calendar-icon {
{/* 모임 인원 */} people-icon { > {/* 모임 시간 */} clock-icon {
pin-icon { />
eyes-icon {"/background"} {"PostImage"} bookmark-icon
eyes-icon.svg { +export const Modal = ({ + isOpen, + children, + onClose, + isHeaderBar, + headerBarStyle = "bg-white", +}: ModalProps) => { const [documentBody, setDocumentBody] = useState(null); const ref = useRef(null); let flag = isOpen; @@ -40,7 +46,7 @@ export const Modal = ({ isOpen, children, onClose, isHeaderBar, headerBarStyle = useEffect(() => { if (isOpen) { - history.pushState({isModal: true}, ""); + history.pushState({ isModal: true }, ""); window.addEventListener("popstate", handlePopState); window.addEventListener("beforeunload", handleBeforeUnload); } @@ -65,7 +71,7 @@ export const Modal = ({ isOpen, children, onClose, isHeaderBar, headerBarStyle =
{ if (e.target == ref.current) { onClose(); @@ -79,7 +85,7 @@ export const Modal = ({ isOpen, children, onClose, isHeaderBar, headerBarStyle = className="transform-origin-center mr-[.5rem] mt-[1rem] h-[2rem] w-[2rem] scale-100 transform transition-transform duration-300 hover:scale-150" > {"close-icon"} { )}
mood-icon
- day-text + day-text
{Array.from({ length: days }, (_, index) => index + 1).map( (day) => ( @@ -68,7 +73,7 @@ const DiaryCard = ({
mood-icon { href="/diary/write" > pencil-green-icon {"YYYY.MM.DD"} {"calendar-icon"}
mood-icon loading-icon { } > -
+
@@ -74,7 +74,7 @@ const GatheringEditor = (props: IGatheringEditorProps) => { onClick={() => { if (!formContext.formState.isValid) { formContext.trigger(); - return ; + return; } props.isEdit == true ? props.updateGatheringHandler() @@ -85,7 +85,7 @@ const GatheringEditor = (props: IGatheringEditorProps) => {
loading-icon { return (
-

카테고리 선택

+

+ 카테고리 선택 +

{props.categoryList.map((i) => ( ))}
-
+
-

+

장소 선택

@@ -210,7 +220,7 @@ const GatheringPlaceModal = (props: IGatheringPlaceModalProps) => { } > {"search-icon"} { >
{"location-icon"} { } > {"search-icon"} { >
{"location-icon"} { new Date(formContext.getValues("scheduleStartDate")), "yyyy-MM-dd ", ) + - (startDateTime.hour+"").padStart(2,"0") + + (startDateTime.hour + "").padStart(2, "0") + ":" + - (startDateTime.minute+"").padStart(2,"0"), + (startDateTime.minute + "").padStart(2, "0"), ); formContext.watch(); formContext.trigger(["scheduleStartDate"]); @@ -47,127 +47,134 @@ const GatheringTimeModal = (props: IGatheringTimeModalProps) => { }; return ( -
- -

시간 선택

-
-
props.closeModal()} > - {/* 날짜 */} -
+ +

+ 시간 선택 +

+
+
- {format(calendarDate[0].startDate, "yyyy.MM.dd(EE)", { - locale: ko, - })} -
-
- {/* 시 */} -
- -
- location-icon -
-
-
- {/* 분 */} -
- -
- location-icon -
-
+ {/* 날짜 */} +
+ {format(calendarDate[0].startDate, "yyyy.MM.dd(EE)", { + locale: ko, + })}
+
+ {/* 시 */} +
+ +
+ location-icon +
+
+
+ {/* 분 */} +
+ +
+ location-icon +
+
+
+
+
+
-
- -
-
+
); }; export default GatheringTimeModal; -// flex 요소 때문에 줄어들고 있음 \ No newline at end of file +// flex 요소 때문에 줄어들고 있음 diff --git a/src/components/gathering/read/GatheringKakaoMap.tsx b/src/components/gathering/read/GatheringKakaoMap.tsx index 516c2729..b7add469 100644 --- a/src/components/gathering/read/GatheringKakaoMap.tsx +++ b/src/components/gathering/read/GatheringKakaoMap.tsx @@ -5,64 +5,61 @@ import Image from "next/image"; import { useEffect } from "react"; const GatheringKakaoMap = (placeResponse: PlaceResponse) => { + useEffect(() => { + if (!placeResponse.name) return; -useEffect(() => { - if (!placeResponse.name) return; + const lat = Number(placeResponse.yaxis); + const lng = Number(placeResponse.xaxis); - const lat = Number(placeResponse.yaxis); - const lng = Number(placeResponse.xaxis); - - const initializeMap = () => { - const container = document.getElementById("map"); - const options = { - center: new window.kakao.maps.LatLng(lat, lng), - level: 3, - }; + const initializeMap = () => { + const container = document.getElementById("map"); + const options = { + center: new window.kakao.maps.LatLng(lat, lng), + level: 3, + }; - const map = new window.kakao.maps.Map(container, options); + const map = new window.kakao.maps.Map(container, options); - map.setDraggable(false); - map.setZoomable(false); + map.setDraggable(false); + map.setZoomable(false); - const marker = new window.kakao.maps.Marker({ - position: new window.kakao.maps.LatLng(lat, lng), - }); + const marker = new window.kakao.maps.Marker({ + position: new window.kakao.maps.LatLng(lat, lng), + }); - marker.setMap(map); + marker.setMap(map); - const debounce = (func: (...args: any[]) => void, delay: number) => { - let timeout: ReturnType; - return (...args: any[]) => { - clearTimeout(timeout); - timeout = setTimeout(() => { - func(...args); - }, delay); + const debounce = (func: (...args: any[]) => void, delay: number) => { + let timeout: ReturnType; + return (...args: any[]) => { + clearTimeout(timeout); + timeout = setTimeout(() => { + func(...args); + }, delay); + }; }; - }; + const handleResize = debounce(() => { + map.relayout(); + map.setCenter(new window.kakao.maps.LatLng(lat, lng)); + }, 300); - const handleResize = debounce(() => { - map.relayout(); - map.setCenter(new window.kakao.maps.LatLng(lat, lng)); - }, 300); + window.addEventListener("resize", handleResize); - window.addEventListener("resize", handleResize); - - return () => { - window.removeEventListener("resize", handleResize); + return () => { + window.removeEventListener("resize", handleResize); + }; }; - }; - - window.kakao.maps.load(initializeMap); -}, [placeResponse]); + window.kakao.maps.load(initializeMap); + }, [placeResponse]); return (
{placeResponse.name && ( {
@@ -100,7 +97,7 @@ useEffect(() => {
{"location-icon"} {placeName && (
{placeName}
{"location-icon"} searchHandler()} > search-icon { - return (
{modalState.isOpen && ( @@ -46,15 +45,12 @@ const GatheringViewer = ({ gatheringStatus={data.gatheringStatus} isFinish={data.isFinish} openChattingUrl={data.openChattingUrl} - /> + />
{/* 프로필 이미지, 닉네임, 좋아요, 조회수 */}
- +
{data.userPostingResponse.name} @@ -74,7 +70,7 @@ const GatheringViewer = ({ />
eyes-icon
{"calendar-icon-image"}
{"location-icon-image"}
{"people-icon-image"}
{"clock-icon-image"} { +const GatheringFilterModal = ({ closeModal }: IGatheringFilterModalProps) => { const searchParams = useSearchParams(); - const [location, setLocation] = useState( - searchParams.get("location") || 0, - ); + const [location, setLocation] = useState(searchParams.get("location") || 0); const [sex, setSex] = useState(searchParams.get("allowedSex") || "ALL"); const [startAge, setStartAge] = useState( searchParams.get("startAge") ? Number(searchParams.get("startAge")) : 20, @@ -83,7 +80,9 @@ const GatheringFilterModal = ({closeModal}: IGatheringFilterModalProps) => { const [endAge, setEndAge] = useState( searchParams.get("endAge") ? Number(searchParams.get("endAge")) : 59, ); - const [isFilterSchedule, setIsFilterSchedule] = useState((searchParams.get("startDate") || searchParams.get("endDate")) ? true : false); + const [isFilterSchedule, setIsFilterSchedule] = useState( + searchParams.get("startDate") || searchParams.get("endDate") ? true : false, + ); const [year, setYear] = useState(new Date().getFullYear()); const [month, setMonth] = useState(new Date().getMonth() + 1); const [calendarDate, setCalendarDate] = useState([ @@ -98,23 +97,23 @@ const GatheringFilterModal = ({closeModal}: IGatheringFilterModalProps) => { }, ]); const [directInput, setDirectInput] = useState(false); - const ageHandler = ({ - _startAge, - _endAge, - }: { - _startAge: number; - _endAge: number; - }) => { - setDirectInput(false); - if ((endAge || 0) + 1 == _startAge) { - setEndAge(_endAge); - } else if ((startAge || 0) - 1 == _endAge) { - setStartAge(_startAge); - } else { - setStartAge(_startAge); - setEndAge(_endAge); - } - }; + const ageHandler = ({ + _startAge, + _endAge, + }: { + _startAge: number; + _endAge: number; + }) => { + setDirectInput(false); + if ((endAge || 0) + 1 == _startAge) { + setEndAge(_endAge); + } else if ((startAge || 0) - 1 == _endAge) { + setStartAge(_startAge); + } else { + setStartAge(_startAge); + setEndAge(_endAge); + } + }; const initFilterOptionHandler = () => { setLocation(0); @@ -123,8 +122,8 @@ const GatheringFilterModal = ({closeModal}: IGatheringFilterModalProps) => { setEndAge(59); setCalendarDate([ { - startDate: new Date(), - endDate: new Date(), + startDate: new Date(), + endDate: new Date(), key: "selection", }, ]); @@ -142,7 +141,7 @@ const GatheringFilterModal = ({closeModal}: IGatheringFilterModalProps) => { params.delete("endDate"); // 지역 if (location != 0) { - params.set("location", location+""); + params.set("location", location + ""); } // 성별 if (sex != "ALL") { @@ -162,23 +161,27 @@ const GatheringFilterModal = ({closeModal}: IGatheringFilterModalProps) => { url.search = params.toString(); closeModal(); setTimeout(() => { - window.history.pushState({}, "", url.toString()); - }, 100); + window.history.pushState({}, "", url.toString()); + }, 100); }; useEffect(() => { - setLocation(+(searchParams.get('location') || 0)); - setSex(searchParams.get('allowedSex') || "ALL"); - setStartAge(+(searchParams.get('startAge') || 20)); - setEndAge(+(searchParams.get('endAge') || 59)); + setLocation(+(searchParams.get("location") || 0)); + setSex(searchParams.get("allowedSex") || "ALL"); + setStartAge(+(searchParams.get("startAge") || 20)); + setEndAge(+(searchParams.get("endAge") || 59)); setCalendarDate([ { - startDate: (searchParams.get('startDate') ? new Date(searchParams.get('startDate') as string) : new Date()), - endDate: (searchParams.get('endDate') ? new Date(searchParams.get('endDate') as string) : new Date()), + startDate: searchParams.get("startDate") + ? new Date(searchParams.get("startDate") as string) + : new Date(), + endDate: searchParams.get("endDate") + ? new Date(searchParams.get("endDate") as string) + : new Date(), key: "selection", }, ]); - }, [searchParams]) + }, [searchParams]); return (
{ onClick={() => closeModal()} > {"close-icon"} {
{"Trip-search-icon"} onSearchClick()} > search-icon loading-icon { "absolute left-[50%] top-[50%] aspect-square w-[2rem] translate-x-[-50%] translate-y-[-50%]" } > - {" "} - {" "} +

- {" "} - 새 리스트 만들기{" "} + 새 리스트 만들기

@@ -31,16 +29,14 @@ const MyBookMarkFolderList = () => {
- {" "} - {" "} +
- {" "} - 관심 모임{" "} + 관심 모임
@@ -49,16 +45,14 @@ const MyBookMarkFolderList = () => {
- {" "} - {" "} +
- {" "} - 나중에 갈 곳{" "} + 나중에 갈 곳
diff --git a/src/components/mypage/MyPageHeader.tsx b/src/components/mypage/MyPageHeader.tsx index cf8c408f..e93d3383 100644 --- a/src/components/mypage/MyPageHeader.tsx +++ b/src/components/mypage/MyPageHeader.tsx @@ -7,7 +7,7 @@ interface IMyPageHeader { userInfo: userResponseDto; } -const MyPageHeader = ({userInfo}:IMyPageHeader) => { +const MyPageHeader = ({ userInfo }: IMyPageHeader) => { return (

마이페이지

@@ -30,7 +30,7 @@ const MyPageHeader = ({userInfo}:IMyPageHeader) => { >
{"setting-icon-image"} diff --git a/src/components/mypage/MyPageUserImage.tsx b/src/components/mypage/MyPageUserImage.tsx index 33d62511..049bcd99 100644 --- a/src/components/mypage/MyPageUserImage.tsx +++ b/src/components/mypage/MyPageUserImage.tsx @@ -39,8 +39,12 @@ const MyPageUserImage = (props: IMyPageUserImage) => { "absolute bottom-0 right-0 flex aspect-square w-[2.375rem] items-center justify-center rounded-[50%] bg-white" } > -
- {"camera-icon-image"} +
+ camera-icon-image
{ imageBase64Data={props.imageBase64Data} closeCropModal={props.closeCropModal} onChangeImageUrl={props.onChangeImageUrl} - /> + /> ); }; -export default MyPageUserImage \ No newline at end of file +export default MyPageUserImage; diff --git a/src/components/mypage/MyProfile.tsx b/src/components/mypage/MyProfile.tsx index 8d1bc32d..149e8443 100644 --- a/src/components/mypage/MyProfile.tsx +++ b/src/components/mypage/MyProfile.tsx @@ -166,7 +166,7 @@ const MyProfile = (props: IMyProfileProps) => {
{"kakao-icon-image"} { return (
-
+
{props.teamMembers.map((member, index) => (
{member.name}

{member.name}

{member.role}

-

- {member.email} -

+

{member.email}

))}
diff --git a/src/components/support/SupportSearch.tsx b/src/components/support/SupportSearch.tsx index 49eea5c0..34ab64cc 100644 --- a/src/components/support/SupportSearch.tsx +++ b/src/components/support/SupportSearch.tsx @@ -6,29 +6,26 @@ interface Props { loading: boolean; } -const SupportSearch = ({ - loading, -}: Props) => { - - const searchParams = useSearchParams(); - const [dropdownValue, setDropdownValue] = useState( - searchParams.get("tagName") != null ? "태그" : "제목", +const SupportSearch = ({ loading }: Props) => { + const searchParams = useSearchParams(); + const [dropdownValue, setDropdownValue] = useState( + searchParams.get("tagName") != null ? "태그" : "제목", + ); + const [searchValue, setSearchValue] = useState( + searchParams.get("search") || searchParams.get("tagName") || "", ); - const [searchValue, setSearchValue] = useState( - searchParams.get("search") || searchParams.get("tagName") || "", - ); - const searchHandler = () => { - const url = new URL(window.location.href); - const params = new URLSearchParams(url.search); - if (searchValue == params.get("search")) return; - searchValue == "" - ? params.delete("search") - : params.set("search", searchValue); - params.delete("page"); - url.search = params.toString(); - window.history.pushState({}, "", url.toString()); - }; + const searchHandler = () => { + const url = new URL(window.location.href); + const params = new URLSearchParams(url.search); + if (searchValue == params.get("search")) return; + searchValue == "" + ? params.delete("search") + : params.set("search", searchValue); + params.delete("page"); + url.search = params.toString(); + window.history.pushState({}, "", url.toString()); + }; if (loading) return ( @@ -38,10 +35,10 @@ const SupportSearch = ({ ); return ( -
+
searchHandler()} > search-icon { - const { id: userId } = useAuthStore(); - const [isBookMark, setIsBookMark] = useState(props.isBookMark); - const [loading, setLoading] = useState(false); + const { id: userId } = useAuthStore(); + const [isBookMark, setIsBookMark] = useState(props.isBookMark); + const [loading, setLoading] = useState(false); - const handleClick = async (e: React.MouseEvent) => { - if (loading) return; - e.preventDefault(); - setLoading(true); - - const newIsLike = !isBookMark; - setIsBookMark(newIsLike); + const handleClick = async (e: React.MouseEvent) => { + if (loading) return; + e.preventDefault(); + setLoading(true); - try { - const response = await fetchWithAuth(`/api/bookmark/gathering?gatheringId=${props.postId}`, { - method: isBookMark ? "DELETE" : "POST", - headers: { "Content-Type": "application/json" }, - }); + const newIsLike = !isBookMark; + setIsBookMark(newIsLike); - if (!response.ok) { - throw new Error("Network response was not ok"); - } - - } catch (error) { - setIsBookMark(isBookMark); - } finally { - setLoading(false); - } - }; + try { + const response = await fetchWithAuth( + `/api/bookmark/gathering?gatheringId=${props.postId}`, + { + method: isBookMark ? "DELETE" : "POST", + headers: { "Content-Type": "application/json" }, + }, + ); - return ( - - ); + if (!response.ok) { + throw new Error("Network response was not ok"); + } + } catch (error) { + setIsBookMark(isBookMark); + } finally { + setLoading(false); + } + }; + + return ( + + ); }; export default GatheringBookMarkContainer; diff --git a/src/containers/home/HomeCarouselContainer.tsx b/src/containers/home/HomeCarouselContainer.tsx index f8b97802..dc276661 100644 --- a/src/containers/home/HomeCarouselContainer.tsx +++ b/src/containers/home/HomeCarouselContainer.tsx @@ -9,10 +9,10 @@ interface IHomeCarouselContainer { const HomeCarouselContainer = (props: IHomeCarouselContainer) => { const [currentIndex, setCurrentIndex] = useState(0); const [bannerList, _] = useState([ - { id: 0, name: "", url: "/background1.png" }, - { id: 0, name: "", url: "/background2.png" }, - { id: 0, name: "", url: "/background3.png" }, - { id: 0, name: "", url: "/background4.png" }, + { id: 0, name: "", url: "/home/background1.png" }, + { id: 0, name: "", url: "/home/background2.png" }, + { id: 0, name: "", url: "/home/background3.png" }, + { id: 0, name: "", url: "/home/background4.png" }, ...props.initBannerList, ]); diff --git a/src/containers/mypage/MyBookmarkListContainer.tsx b/src/containers/mypage/MyBookmarkListContainer.tsx index 873093c4..db6ffa60 100644 --- a/src/containers/mypage/MyBookmarkListContainer.tsx +++ b/src/containers/mypage/MyBookmarkListContainer.tsx @@ -29,42 +29,7 @@ const data: ( likes: number; views: number; } -)[] = [ - { - id: 1, - category: "맛집", - title: "커피와 프렌치토스트가 맛있는 재즈카페 시노라 북촌점", - image: "/PostImage.svg", - }, - { - id: 2, - category: "숙박", - title: "다양한 프로그램이 있는 제주 월정리 게하", - image: "/PostImage2.svg", - }, - { - id: 3, - category: "액티비티", - title: "혼자 놀기 초보도 가능한 국립현대미술관", - image: "/PostImage3.svg", - }, - { - id: 4, - category: "활동", - bookmark: true, - title: "동해 서핑 투게더", - username: "waver", - date: new Date(), - location: "강원, 동해시", - time: "08:00", - image: "/PostImage2.svg", - current: 1, - total: 6, - qualification: "(30대, 성별 상관없음)", - likes: 52, - views: 102, - }, -]; +)[] = []; const MyBookmarkListContainer = ({ activeBookmarkMenuIndex, diff --git a/src/styles/globals.css b/src/styles/globals.css index 907abc71..3258fcbc 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -158,7 +158,7 @@ body { color: rgba(0, 0, 0, 0); opacity: 1; display: block; - background: url("/calendar-icon.svg") no-repeat; + background: url("/gathering/calendar-icon.svg") no-repeat; width: 0.75rem; height: 0.75rem; border-width: thin;