diff --git a/frontend-temp/src/App.jsx b/frontend-temp/src/App.jsx index 3cd11d0..9dfaf41 100644 --- a/frontend-temp/src/App.jsx +++ b/frontend-temp/src/App.jsx @@ -6,33 +6,34 @@ import { BrowserView, MobileView } from 'react-device-detect'; import { ScrollToTop } from '@/components/common'; // PC 레이아웃 -import { Layout as PCLayout } from '@/components/pc'; +import { Layout as PCLayout } from '@/components/pc/public'; // Mobile 레이아웃 import { Layout as MobileLayout } from '@/components/mobile'; -// 페이지 -import { PCHome, MobileHome } from '@/pages/home'; -import { PCMembers, MobileMembers } from '@/pages/members'; -import { - PCSchedule, - MobileSchedule, - PCScheduleDetail, - MobileScheduleDetail, - PCBirthday, - MobileBirthday, -} from '@/pages/schedule'; -import { - PCAlbum, - MobileAlbum, - PCAlbumDetail, - MobileAlbumDetail, - PCTrackDetail, - MobileTrackDetail, - PCAlbumGallery, - MobileAlbumGallery, -} from '@/pages/album'; -import { PCNotFound, MobileNotFound } from '@/pages/common'; +// PC 페이지 +import PCHome from '@/pages/pc/public/home/Home'; +import PCMembers from '@/pages/pc/public/members/Members'; +import PCSchedule from '@/pages/pc/public/schedule/Schedule'; +import PCScheduleDetail from '@/pages/pc/public/schedule/ScheduleDetail'; +import PCBirthday from '@/pages/pc/public/schedule/Birthday'; +import PCAlbum from '@/pages/pc/public/album/Album'; +import PCAlbumDetail from '@/pages/pc/public/album/AlbumDetail'; +import PCTrackDetail from '@/pages/pc/public/album/TrackDetail'; +import PCAlbumGallery from '@/pages/pc/public/album/AlbumGallery'; +import PCNotFound from '@/pages/pc/public/common/NotFound'; + +// Mobile 페이지 +import MobileHome from '@/pages/mobile/home/Home'; +import MobileMembers from '@/pages/mobile/members/Members'; +import MobileSchedule from '@/pages/mobile/schedule/Schedule'; +import MobileScheduleDetail from '@/pages/mobile/schedule/ScheduleDetail'; +import MobileBirthday from '@/pages/mobile/schedule/Birthday'; +import MobileAlbum from '@/pages/mobile/album/Album'; +import MobileAlbumDetail from '@/pages/mobile/album/AlbumDetail'; +import MobileTrackDetail from '@/pages/mobile/album/TrackDetail'; +import MobileAlbumGallery from '@/pages/mobile/album/AlbumGallery'; +import MobileNotFound from '@/pages/mobile/common/NotFound'; /** * PC 환경에서 body에 클래스 추가하는 래퍼 diff --git a/frontend-temp/src/api/client.js b/frontend-temp/src/api/common/client.js similarity index 100% rename from frontend-temp/src/api/client.js rename to frontend-temp/src/api/common/client.js diff --git a/frontend-temp/src/api/common/index.js b/frontend-temp/src/api/common/index.js new file mode 100644 index 0000000..4f1cce4 --- /dev/null +++ b/frontend-temp/src/api/common/index.js @@ -0,0 +1 @@ +export * from './client'; diff --git a/frontend-temp/src/api/index.js b/frontend-temp/src/api/index.js index 2ad80fc..6a6a3e6 100644 --- a/frontend-temp/src/api/index.js +++ b/frontend-temp/src/api/index.js @@ -2,30 +2,19 @@ * API 통합 export */ -// 클라이언트 -export { - fetchApi, - fetchAuthApi, - fetchFormData, - ApiError, - get, - authGet, - post, - authPost, - put, - authPut, - del, - authDel, -} from './client'; +// 공통 유틸리티 +export * from './common/client'; -// 인증 -export * as authApi from './auth'; +// 공개 API +export * as scheduleApi from './pc/public/schedules'; +export * as albumApi from './pc/public/albums'; +export * as memberApi from './pc/common/members'; -// 스케줄 -export * as scheduleApi from './schedules'; +// 관리자 API +export * as authApi from './pc/admin/auth'; -// 앨범 -export * as albumApi from './albums'; - -// 멤버 -export * as memberApi from './members'; +// 개별 함수도 export (하위 호환성) +export * from './pc/public/schedules'; +export * from './pc/public/albums'; +export * from './pc/common/members'; +export * from './pc/admin/auth'; diff --git a/frontend-temp/src/api/auth.js b/frontend-temp/src/api/pc/admin/auth.js similarity index 90% rename from frontend-temp/src/api/auth.js rename to frontend-temp/src/api/pc/admin/auth.js index d45e805..4ac9188 100644 --- a/frontend-temp/src/api/auth.js +++ b/frontend-temp/src/api/pc/admin/auth.js @@ -1,7 +1,7 @@ /** - * 인증 API + * 관리자 인증 API */ -import { fetchApi, fetchAuthApi } from './client'; +import { fetchApi, fetchAuthApi } from '@/api/common/client'; /** * 로그인 diff --git a/frontend-temp/src/api/pc/admin/index.js b/frontend-temp/src/api/pc/admin/index.js new file mode 100644 index 0000000..269586e --- /dev/null +++ b/frontend-temp/src/api/pc/admin/index.js @@ -0,0 +1 @@ +export * from './auth'; diff --git a/frontend-temp/src/api/pc/common/index.js b/frontend-temp/src/api/pc/common/index.js new file mode 100644 index 0000000..2d3db7f --- /dev/null +++ b/frontend-temp/src/api/pc/common/index.js @@ -0,0 +1 @@ +export * from './members'; diff --git a/frontend-temp/src/api/members.js b/frontend-temp/src/api/pc/common/members.js similarity index 91% rename from frontend-temp/src/api/members.js rename to frontend-temp/src/api/pc/common/members.js index d93814e..c187f00 100644 --- a/frontend-temp/src/api/members.js +++ b/frontend-temp/src/api/pc/common/members.js @@ -1,7 +1,7 @@ /** * 멤버 API */ -import { fetchApi, fetchAuthApi, fetchFormData } from './client'; +import { fetchApi, fetchAuthApi, fetchFormData } from '@/api/common/client'; // ==================== 공개 API ==================== diff --git a/frontend-temp/src/api/albums.js b/frontend-temp/src/api/pc/public/albums.js similarity index 96% rename from frontend-temp/src/api/albums.js rename to frontend-temp/src/api/pc/public/albums.js index 2265c43..312e4dc 100644 --- a/frontend-temp/src/api/albums.js +++ b/frontend-temp/src/api/pc/public/albums.js @@ -1,7 +1,7 @@ /** * 앨범 API */ -import { fetchApi, fetchAuthApi, fetchFormData } from './client'; +import { fetchApi, fetchAuthApi, fetchFormData } from '@/api/common/client'; // ==================== 공개 API ==================== diff --git a/frontend-temp/src/api/pc/public/index.js b/frontend-temp/src/api/pc/public/index.js new file mode 100644 index 0000000..c1c24e0 --- /dev/null +++ b/frontend-temp/src/api/pc/public/index.js @@ -0,0 +1,2 @@ +export * from './schedules'; +export * from './albums'; diff --git a/frontend-temp/src/api/schedules.js b/frontend-temp/src/api/pc/public/schedules.js similarity index 98% rename from frontend-temp/src/api/schedules.js rename to frontend-temp/src/api/pc/public/schedules.js index 26fed66..ad6ad7b 100644 --- a/frontend-temp/src/api/schedules.js +++ b/frontend-temp/src/api/pc/public/schedules.js @@ -1,7 +1,7 @@ /** * 스케줄 API */ -import { fetchApi, fetchAuthApi, fetchFormData } from './client'; +import { fetchApi, fetchAuthApi, fetchFormData } from '@/api/common/client'; import { getTodayKST, dayjs } from '@/utils'; /** diff --git a/frontend-temp/src/components/index.js b/frontend-temp/src/components/index.js index 553d53f..fbbdbe8 100644 --- a/frontend-temp/src/components/index.js +++ b/frontend-temp/src/components/index.js @@ -1,11 +1,8 @@ // 공통 컴포넌트 (디바이스 무관) export * from './common'; -// 스케줄 컴포넌트 -export * from './schedule'; - // PC 컴포넌트 -export * as PC from './pc'; +export * as PC from './pc/public'; // Mobile 컴포넌트 export * as Mobile from './mobile'; diff --git a/frontend-temp/src/components/schedule/AdminScheduleCard.jsx b/frontend-temp/src/components/pc/admin/AdminScheduleCard.jsx similarity index 100% rename from frontend-temp/src/components/schedule/AdminScheduleCard.jsx rename to frontend-temp/src/components/pc/admin/AdminScheduleCard.jsx diff --git a/frontend-temp/src/components/schedule/index.js b/frontend-temp/src/components/pc/admin/index.js similarity index 57% rename from frontend-temp/src/components/schedule/index.js rename to frontend-temp/src/components/pc/admin/index.js index 9297f60..f07e79b 100644 --- a/frontend-temp/src/components/schedule/index.js +++ b/frontend-temp/src/components/pc/admin/index.js @@ -1,5 +1,2 @@ -// 공용 함수 -export { fireBirthdayConfetti } from './confetti'; - // 관리자 컴포넌트 export { default as AdminScheduleCard } from './AdminScheduleCard'; diff --git a/frontend-temp/src/components/pc/BirthdayCard.jsx b/frontend-temp/src/components/pc/public/BirthdayCard.jsx similarity index 100% rename from frontend-temp/src/components/pc/BirthdayCard.jsx rename to frontend-temp/src/components/pc/public/BirthdayCard.jsx diff --git a/frontend-temp/src/components/pc/Calendar.jsx b/frontend-temp/src/components/pc/public/Calendar.jsx similarity index 100% rename from frontend-temp/src/components/pc/Calendar.jsx rename to frontend-temp/src/components/pc/public/Calendar.jsx diff --git a/frontend-temp/src/components/pc/CategoryFilter.jsx b/frontend-temp/src/components/pc/public/CategoryFilter.jsx similarity index 100% rename from frontend-temp/src/components/pc/CategoryFilter.jsx rename to frontend-temp/src/components/pc/public/CategoryFilter.jsx diff --git a/frontend-temp/src/components/pc/Footer.jsx b/frontend-temp/src/components/pc/public/Footer.jsx similarity index 100% rename from frontend-temp/src/components/pc/Footer.jsx rename to frontend-temp/src/components/pc/public/Footer.jsx diff --git a/frontend-temp/src/components/pc/Header.jsx b/frontend-temp/src/components/pc/public/Header.jsx similarity index 100% rename from frontend-temp/src/components/pc/Header.jsx rename to frontend-temp/src/components/pc/public/Header.jsx diff --git a/frontend-temp/src/components/pc/Layout.jsx b/frontend-temp/src/components/pc/public/Layout.jsx similarity index 100% rename from frontend-temp/src/components/pc/Layout.jsx rename to frontend-temp/src/components/pc/public/Layout.jsx diff --git a/frontend-temp/src/components/pc/ScheduleCard.jsx b/frontend-temp/src/components/pc/public/ScheduleCard.jsx similarity index 100% rename from frontend-temp/src/components/pc/ScheduleCard.jsx rename to frontend-temp/src/components/pc/public/ScheduleCard.jsx diff --git a/frontend-temp/src/components/pc/index.js b/frontend-temp/src/components/pc/public/index.js similarity index 100% rename from frontend-temp/src/components/pc/index.js rename to frontend-temp/src/components/pc/public/index.js diff --git a/frontend-temp/src/hooks/common/index.js b/frontend-temp/src/hooks/common/index.js new file mode 100644 index 0000000..ffc4934 --- /dev/null +++ b/frontend-temp/src/hooks/common/index.js @@ -0,0 +1,28 @@ +// 미디어 쿼리 +export { useMediaQuery, useIsMobile, useIsDesktop, useIsTablet } from './useMediaQuery'; + +// 멤버 데이터 +export { useMembers, useMemberDetail } from './useMemberData'; + +// 앨범 데이터 +export { useAlbums, useAlbumDetail, useAlbumGallery } from './useAlbumData'; + +// 스케줄 데이터 +export { + useScheduleData, + useScheduleDetail, + useUpcomingSchedules, + useCategories, +} from './useScheduleData'; + +// 스케줄 검색 +export { useScheduleSearch } from './useScheduleSearch'; + +// 스케줄 필터링 +export { useScheduleFiltering, useCategoryCounts } from './useScheduleFiltering'; + +// 캘린더 +export { useCalendar } from './useCalendar'; + +// 라이트박스 +export { useLightbox } from './useLightbox'; diff --git a/frontend-temp/src/hooks/useAlbumData.js b/frontend-temp/src/hooks/common/useAlbumData.js similarity index 100% rename from frontend-temp/src/hooks/useAlbumData.js rename to frontend-temp/src/hooks/common/useAlbumData.js diff --git a/frontend-temp/src/hooks/useCalendar.js b/frontend-temp/src/hooks/common/useCalendar.js similarity index 100% rename from frontend-temp/src/hooks/useCalendar.js rename to frontend-temp/src/hooks/common/useCalendar.js diff --git a/frontend-temp/src/hooks/useLightbox.js b/frontend-temp/src/hooks/common/useLightbox.js similarity index 100% rename from frontend-temp/src/hooks/useLightbox.js rename to frontend-temp/src/hooks/common/useLightbox.js diff --git a/frontend-temp/src/hooks/useMediaQuery.js b/frontend-temp/src/hooks/common/useMediaQuery.js similarity index 100% rename from frontend-temp/src/hooks/useMediaQuery.js rename to frontend-temp/src/hooks/common/useMediaQuery.js diff --git a/frontend-temp/src/hooks/useMemberData.js b/frontend-temp/src/hooks/common/useMemberData.js similarity index 100% rename from frontend-temp/src/hooks/useMemberData.js rename to frontend-temp/src/hooks/common/useMemberData.js diff --git a/frontend-temp/src/hooks/useScheduleData.js b/frontend-temp/src/hooks/common/useScheduleData.js similarity index 100% rename from frontend-temp/src/hooks/useScheduleData.js rename to frontend-temp/src/hooks/common/useScheduleData.js diff --git a/frontend-temp/src/hooks/useScheduleFiltering.js b/frontend-temp/src/hooks/common/useScheduleFiltering.js similarity index 100% rename from frontend-temp/src/hooks/useScheduleFiltering.js rename to frontend-temp/src/hooks/common/useScheduleFiltering.js diff --git a/frontend-temp/src/hooks/useScheduleSearch.js b/frontend-temp/src/hooks/common/useScheduleSearch.js similarity index 100% rename from frontend-temp/src/hooks/useScheduleSearch.js rename to frontend-temp/src/hooks/common/useScheduleSearch.js diff --git a/frontend-temp/src/hooks/index.js b/frontend-temp/src/hooks/index.js index 6f00342..cc3205f 100644 --- a/frontend-temp/src/hooks/index.js +++ b/frontend-temp/src/hooks/index.js @@ -2,31 +2,8 @@ * 훅 통합 export */ -// 미디어 쿼리 -export { useMediaQuery, useIsMobile, useIsDesktop, useIsTablet } from './useMediaQuery'; +// 공통 훅 +export * from './common'; -// 멤버 데이터 -export { useMembers, useMemberDetail } from './useMemberData'; - -// 앨범 데이터 -export { useAlbums, useAlbumDetail, useAlbumGallery } from './useAlbumData'; - -// 스케줄 데이터 -export { - useScheduleData, - useScheduleDetail, - useUpcomingSchedules, - useCategories, -} from './useScheduleData'; - -// 스케줄 검색 -export { useScheduleSearch } from './useScheduleSearch'; - -// 스케줄 필터링 -export { useScheduleFiltering, useCategoryCounts } from './useScheduleFiltering'; - -// 캘린더 -export { useCalendar } from './useCalendar'; - -// 인증 -export { useAdminAuth, useRedirectIfAuthenticated } from './useAdminAuth'; +// 관리자 훅 +export * from './pc/admin'; diff --git a/frontend-temp/src/hooks/pc/admin/index.js b/frontend-temp/src/hooks/pc/admin/index.js new file mode 100644 index 0000000..02dd608 --- /dev/null +++ b/frontend-temp/src/hooks/pc/admin/index.js @@ -0,0 +1,2 @@ +// 관리자 인증 +export { useAdminAuth, useRedirectIfAuthenticated } from './useAdminAuth'; diff --git a/frontend-temp/src/hooks/useAdminAuth.js b/frontend-temp/src/hooks/pc/admin/useAdminAuth.js similarity index 100% rename from frontend-temp/src/hooks/useAdminAuth.js rename to frontend-temp/src/hooks/pc/admin/useAdminAuth.js diff --git a/frontend-temp/src/pages/album/index.js b/frontend-temp/src/pages/album/index.js deleted file mode 100644 index 8551119..0000000 --- a/frontend-temp/src/pages/album/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export { default as PCAlbum } from './pc/Album'; -export { default as MobileAlbum } from './mobile/Album'; -export { default as PCAlbumDetail } from './pc/AlbumDetail'; -export { default as MobileAlbumDetail } from './mobile/AlbumDetail'; -export { default as PCTrackDetail } from './pc/TrackDetail'; -export { default as MobileTrackDetail } from './mobile/TrackDetail'; -export { default as PCAlbumGallery } from './pc/AlbumGallery'; -export { default as MobileAlbumGallery } from './mobile/AlbumGallery'; diff --git a/frontend-temp/src/pages/common/index.js b/frontend-temp/src/pages/common/index.js deleted file mode 100644 index 01b4fe6..0000000 --- a/frontend-temp/src/pages/common/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// PC -export { default as PCNotFound } from './pc/NotFound'; - -// Mobile -export { default as MobileNotFound } from './mobile/NotFound'; diff --git a/frontend-temp/src/pages/home/index.js b/frontend-temp/src/pages/home/index.js deleted file mode 100644 index f08737e..0000000 --- a/frontend-temp/src/pages/home/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { default as PCHome } from './pc/Home'; -export { default as MobileHome } from './mobile/Home'; diff --git a/frontend-temp/src/pages/index.js b/frontend-temp/src/pages/index.js deleted file mode 100644 index 9f87a08..0000000 --- a/frontend-temp/src/pages/index.js +++ /dev/null @@ -1,5 +0,0 @@ -// 홈 페이지 -export * from './home'; - -// 멤버 페이지 -export * from './members'; diff --git a/frontend-temp/src/pages/members/index.js b/frontend-temp/src/pages/members/index.js deleted file mode 100644 index c04e64c..0000000 --- a/frontend-temp/src/pages/members/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { default as PCMembers } from './pc/Members'; -export { default as MobileMembers } from './mobile/Members'; diff --git a/frontend-temp/src/pages/album/mobile/Album.jsx b/frontend-temp/src/pages/mobile/album/Album.jsx similarity index 97% rename from frontend-temp/src/pages/album/mobile/Album.jsx rename to frontend-temp/src/pages/mobile/album/Album.jsx index cf12638..5ce4f46 100644 --- a/frontend-temp/src/pages/album/mobile/Album.jsx +++ b/frontend-temp/src/pages/mobile/album/Album.jsx @@ -1,7 +1,7 @@ import { motion } from 'framer-motion'; import { useQuery } from '@tanstack/react-query'; import { useNavigate } from 'react-router-dom'; -import { getAlbums } from '@/api/albums'; +import { getAlbums } from '@/api'; /** * Mobile 앨범 목록 페이지 diff --git a/frontend-temp/src/pages/album/mobile/AlbumDetail.jsx b/frontend-temp/src/pages/mobile/album/AlbumDetail.jsx similarity index 99% rename from frontend-temp/src/pages/album/mobile/AlbumDetail.jsx rename to frontend-temp/src/pages/mobile/album/AlbumDetail.jsx index 149ccc0..ca5ef95 100644 --- a/frontend-temp/src/pages/album/mobile/AlbumDetail.jsx +++ b/frontend-temp/src/pages/mobile/album/AlbumDetail.jsx @@ -13,7 +13,7 @@ import { FileText, ChevronRight, } from 'lucide-react'; -import { getAlbumByName } from '@/api/albums'; +import { getAlbumByName } from '@/api'; import { formatDate, calculateTotalDuration } from '@/utils'; import { MobileLightbox } from '@/components/common'; diff --git a/frontend-temp/src/pages/album/mobile/AlbumGallery.jsx b/frontend-temp/src/pages/mobile/album/AlbumGallery.jsx similarity index 99% rename from frontend-temp/src/pages/album/mobile/AlbumGallery.jsx rename to frontend-temp/src/pages/mobile/album/AlbumGallery.jsx index 62b0f7b..1259413 100644 --- a/frontend-temp/src/pages/album/mobile/AlbumGallery.jsx +++ b/frontend-temp/src/pages/mobile/album/AlbumGallery.jsx @@ -3,7 +3,7 @@ import { useParams, useNavigate } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { ChevronRight } from 'lucide-react'; import { motion } from 'framer-motion'; -import { getAlbumByName } from '@/api/albums'; +import { getAlbumByName } from '@/api'; import { MobileLightbox } from '@/components/common'; /** diff --git a/frontend-temp/src/pages/album/mobile/TrackDetail.jsx b/frontend-temp/src/pages/mobile/album/TrackDetail.jsx similarity index 99% rename from frontend-temp/src/pages/album/mobile/TrackDetail.jsx rename to frontend-temp/src/pages/mobile/album/TrackDetail.jsx index fa68988..58c4b19 100644 --- a/frontend-temp/src/pages/album/mobile/TrackDetail.jsx +++ b/frontend-temp/src/pages/mobile/album/TrackDetail.jsx @@ -3,7 +3,7 @@ import { useParams, useNavigate, Link } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { motion } from 'framer-motion'; import { Clock, User, Music, Mic2, ChevronDown, ChevronUp } from 'lucide-react'; -import { getTrack } from '@/api/albums'; +import { getTrack } from '@/api'; import { getYoutubeVideoId, parseCredits } from '@/utils'; /** diff --git a/frontend-temp/src/pages/common/mobile/NotFound.jsx b/frontend-temp/src/pages/mobile/common/NotFound.jsx similarity index 100% rename from frontend-temp/src/pages/common/mobile/NotFound.jsx rename to frontend-temp/src/pages/mobile/common/NotFound.jsx diff --git a/frontend-temp/src/pages/home/mobile/Home.jsx b/frontend-temp/src/pages/mobile/home/Home.jsx similarity index 100% rename from frontend-temp/src/pages/home/mobile/Home.jsx rename to frontend-temp/src/pages/mobile/home/Home.jsx diff --git a/frontend-temp/src/pages/members/mobile/Members.jsx b/frontend-temp/src/pages/mobile/members/Members.jsx similarity index 100% rename from frontend-temp/src/pages/members/mobile/Members.jsx rename to frontend-temp/src/pages/mobile/members/Members.jsx diff --git a/frontend-temp/src/pages/schedule/mobile/Birthday.jsx b/frontend-temp/src/pages/mobile/schedule/Birthday.jsx similarity index 99% rename from frontend-temp/src/pages/schedule/mobile/Birthday.jsx rename to frontend-temp/src/pages/mobile/schedule/Birthday.jsx index 70ef363..ce3c4b1 100644 --- a/frontend-temp/src/pages/schedule/mobile/Birthday.jsx +++ b/frontend-temp/src/pages/mobile/schedule/Birthday.jsx @@ -2,7 +2,7 @@ import { useParams, Link } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { motion } from 'framer-motion'; import { ChevronLeft } from 'lucide-react'; -import { fetchApi } from '@/api/client'; +import { fetchApi } from '@/api'; /** * Mobile 생일 페이지 diff --git a/frontend-temp/src/pages/schedule/mobile/Schedule.jsx b/frontend-temp/src/pages/mobile/schedule/Schedule.jsx similarity index 99% rename from frontend-temp/src/pages/schedule/mobile/Schedule.jsx rename to frontend-temp/src/pages/mobile/schedule/Schedule.jsx index 6df4800..245253a 100644 --- a/frontend-temp/src/pages/schedule/mobile/Schedule.jsx +++ b/frontend-temp/src/pages/mobile/schedule/Schedule.jsx @@ -7,7 +7,7 @@ import { useInView } from 'react-intersection-observer'; import { useVirtualizer } from '@tanstack/react-virtual'; import { getTodayKST, getCategoryInfo } from '@/utils'; -import { getSchedules, searchSchedules } from '@/api/schedules'; +import { getSchedules, searchSchedules } from '@/api'; import { useScheduleStore } from '@/stores'; import { MIN_YEAR, SEARCH_LIMIT } from '@/constants'; import { @@ -16,7 +16,7 @@ import { ScheduleSearchCard as MobileScheduleSearchCard, BirthdayCard as MobileBirthdayCard, } from '@/components/mobile'; -import { fireBirthdayConfetti } from '@/components/schedule'; +import { fireBirthdayConfetti } from '@/utils'; /** * 모바일 일정 페이지 diff --git a/frontend-temp/src/pages/schedule/mobile/ScheduleDetail.jsx b/frontend-temp/src/pages/mobile/schedule/ScheduleDetail.jsx similarity index 99% rename from frontend-temp/src/pages/schedule/mobile/ScheduleDetail.jsx rename to frontend-temp/src/pages/mobile/schedule/ScheduleDetail.jsx index f510a22..7bce5aa 100644 --- a/frontend-temp/src/pages/schedule/mobile/ScheduleDetail.jsx +++ b/frontend-temp/src/pages/mobile/schedule/ScheduleDetail.jsx @@ -4,8 +4,9 @@ import { useEffect, useState, useRef } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { Calendar, Clock, ChevronLeft, Link2, X, ChevronRight } from 'lucide-react'; import Linkify from 'react-linkify'; -import { getSchedule } from '@/api/schedules'; -import { CATEGORY_ID, decodeHtmlEntities, formatFullDate, formatTime, formatXDateTime } from '../sections/utils'; +import { getSchedule } from '@/api'; +import { CATEGORY_ID } from '@/constants'; +import { decodeHtmlEntities, formatFullDate, formatTime, formatXDateTime } from '@/utils'; /** * 전체화면 시 자동 가로 회전 훅 (숏츠가 아닐 때만) diff --git a/frontend-temp/src/pages/album/pc/Album.jsx b/frontend-temp/src/pages/pc/public/album/Album.jsx similarity index 99% rename from frontend-temp/src/pages/album/pc/Album.jsx rename to frontend-temp/src/pages/pc/public/album/Album.jsx index 72df0b3..0c122bb 100644 --- a/frontend-temp/src/pages/album/pc/Album.jsx +++ b/frontend-temp/src/pages/pc/public/album/Album.jsx @@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query'; import { useNavigate } from 'react-router-dom'; import { motion } from 'framer-motion'; import { Calendar, Music } from 'lucide-react'; -import { getAlbums } from '@/api/albums'; +import { getAlbums } from '@/api'; import { formatDate } from '@/utils'; /** diff --git a/frontend-temp/src/pages/album/pc/AlbumDetail.jsx b/frontend-temp/src/pages/pc/public/album/AlbumDetail.jsx similarity index 99% rename from frontend-temp/src/pages/album/pc/AlbumDetail.jsx rename to frontend-temp/src/pages/pc/public/album/AlbumDetail.jsx index 8b4b7d8..a031a64 100644 --- a/frontend-temp/src/pages/album/pc/AlbumDetail.jsx +++ b/frontend-temp/src/pages/pc/public/album/AlbumDetail.jsx @@ -3,7 +3,7 @@ import { useParams, useNavigate } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { motion, AnimatePresence } from 'framer-motion'; import { Calendar, Music2, Clock, X, MoreVertical, FileText } from 'lucide-react'; -import { getAlbumByName } from '@/api/albums'; +import { getAlbumByName } from '@/api'; import { formatDate, calculateTotalDuration } from '@/utils'; import { Lightbox } from '@/components/common'; diff --git a/frontend-temp/src/pages/album/pc/AlbumGallery.jsx b/frontend-temp/src/pages/pc/public/album/AlbumGallery.jsx similarity index 99% rename from frontend-temp/src/pages/album/pc/AlbumGallery.jsx rename to frontend-temp/src/pages/pc/public/album/AlbumGallery.jsx index b56f729..c5a0ca6 100644 --- a/frontend-temp/src/pages/album/pc/AlbumGallery.jsx +++ b/frontend-temp/src/pages/pc/public/album/AlbumGallery.jsx @@ -5,7 +5,7 @@ import { motion, AnimatePresence } from 'framer-motion'; import { X, ChevronLeft, ChevronRight, Download } from 'lucide-react'; import { RowsPhotoAlbum } from 'react-photo-album'; import 'react-photo-album/rows.css'; -import { getAlbumByName } from '@/api/albums'; +import { getAlbumByName } from '@/api'; import { LightboxIndicator } from '@/components/common'; // 갤러리 CSS 스타일 diff --git a/frontend-temp/src/pages/album/pc/TrackDetail.jsx b/frontend-temp/src/pages/pc/public/album/TrackDetail.jsx similarity index 99% rename from frontend-temp/src/pages/album/pc/TrackDetail.jsx rename to frontend-temp/src/pages/pc/public/album/TrackDetail.jsx index 845ae59..18f976a 100644 --- a/frontend-temp/src/pages/album/pc/TrackDetail.jsx +++ b/frontend-temp/src/pages/pc/public/album/TrackDetail.jsx @@ -3,7 +3,7 @@ import { useParams, useNavigate, Link } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { motion } from 'framer-motion'; import { Clock, User, Music, Mic2, ChevronRight } from 'lucide-react'; -import { getTrack } from '@/api/albums'; +import { getTrack } from '@/api'; import { getYoutubeVideoId, parseCredits } from '@/utils'; /** diff --git a/frontend-temp/src/pages/common/pc/NotFound.jsx b/frontend-temp/src/pages/pc/public/common/NotFound.jsx similarity index 100% rename from frontend-temp/src/pages/common/pc/NotFound.jsx rename to frontend-temp/src/pages/pc/public/common/NotFound.jsx diff --git a/frontend-temp/src/pages/home/pc/Home.jsx b/frontend-temp/src/pages/pc/public/home/Home.jsx similarity index 99% rename from frontend-temp/src/pages/home/pc/Home.jsx rename to frontend-temp/src/pages/pc/public/home/Home.jsx index c91ae00..7731f74 100644 --- a/frontend-temp/src/pages/home/pc/Home.jsx +++ b/frontend-temp/src/pages/pc/public/home/Home.jsx @@ -3,7 +3,7 @@ import { motion } from 'framer-motion'; import { Link } from 'react-router-dom'; import { Calendar, ArrowRight, Music } from 'lucide-react'; import { useMembers, useAlbums, useUpcomingSchedules } from '@/hooks'; -import { ScheduleCard } from '@/components/pc'; +import { ScheduleCard } from '@/components/pc/public'; import { GROUP_INFO } from '@/constants'; /** diff --git a/frontend-temp/src/pages/members/pc/Members.jsx b/frontend-temp/src/pages/pc/public/members/Members.jsx similarity index 100% rename from frontend-temp/src/pages/members/pc/Members.jsx rename to frontend-temp/src/pages/pc/public/members/Members.jsx diff --git a/frontend-temp/src/pages/schedule/pc/Birthday.jsx b/frontend-temp/src/pages/pc/public/schedule/Birthday.jsx similarity index 99% rename from frontend-temp/src/pages/schedule/pc/Birthday.jsx rename to frontend-temp/src/pages/pc/public/schedule/Birthday.jsx index a59256f..620c7c3 100644 --- a/frontend-temp/src/pages/schedule/pc/Birthday.jsx +++ b/frontend-temp/src/pages/pc/public/schedule/Birthday.jsx @@ -2,7 +2,7 @@ import { useParams, Link } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { motion } from 'framer-motion'; import { ChevronRight } from 'lucide-react'; -import { fetchApi } from '@/api/client'; +import { fetchApi } from '@/api'; /** * PC 생일 페이지 diff --git a/frontend-temp/src/pages/schedule/pc/Schedule.jsx b/frontend-temp/src/pages/pc/public/schedule/Schedule.jsx similarity index 99% rename from frontend-temp/src/pages/schedule/pc/Schedule.jsx rename to frontend-temp/src/pages/pc/public/schedule/Schedule.jsx index ef6a0e8..5ca2e0d 100644 --- a/frontend-temp/src/pages/schedule/pc/Schedule.jsx +++ b/frontend-temp/src/pages/pc/public/schedule/Schedule.jsx @@ -11,9 +11,9 @@ import { CategoryFilter, ScheduleCard, BirthdayCard, -} from '@/components/pc'; -import { fireBirthdayConfetti } from '@/components/schedule'; -import { getSchedules, searchSchedules } from '@/api/schedules'; +} from '@/components/pc/public'; +import { fireBirthdayConfetti } from '@/utils'; +import { getSchedules, searchSchedules } from '@/api'; import { useScheduleStore } from '@/stores'; import { getTodayKST } from '@/utils'; import { SEARCH_LIMIT } from '@/constants'; diff --git a/frontend-temp/src/pages/schedule/pc/ScheduleDetail.jsx b/frontend-temp/src/pages/pc/public/schedule/ScheduleDetail.jsx similarity index 99% rename from frontend-temp/src/pages/schedule/pc/ScheduleDetail.jsx rename to frontend-temp/src/pages/pc/public/schedule/ScheduleDetail.jsx index 9d9df60..34ccec1 100644 --- a/frontend-temp/src/pages/schedule/pc/ScheduleDetail.jsx +++ b/frontend-temp/src/pages/pc/public/schedule/ScheduleDetail.jsx @@ -2,7 +2,7 @@ import { useParams, Link } from 'react-router-dom'; import { useQuery, keepPreviousData } from '@tanstack/react-query'; import { motion } from 'framer-motion'; import { Calendar, ChevronRight } from 'lucide-react'; -import { getSchedule } from '@/api/schedules'; +import { getSchedule } from '@/api'; // 섹션 컴포넌트들 import { YoutubeSection, XSection, DefaultSection, CATEGORY_ID, decodeHtmlEntities } from '../sections'; diff --git a/frontend-temp/src/pages/schedule/sections/DefaultSection.jsx b/frontend-temp/src/pages/pc/public/schedule/sections/DefaultSection.jsx similarity index 100% rename from frontend-temp/src/pages/schedule/sections/DefaultSection.jsx rename to frontend-temp/src/pages/pc/public/schedule/sections/DefaultSection.jsx diff --git a/frontend-temp/src/pages/schedule/sections/XSection.jsx b/frontend-temp/src/pages/pc/public/schedule/sections/XSection.jsx similarity index 100% rename from frontend-temp/src/pages/schedule/sections/XSection.jsx rename to frontend-temp/src/pages/pc/public/schedule/sections/XSection.jsx diff --git a/frontend-temp/src/pages/schedule/sections/YoutubeSection.jsx b/frontend-temp/src/pages/pc/public/schedule/sections/YoutubeSection.jsx similarity index 100% rename from frontend-temp/src/pages/schedule/sections/YoutubeSection.jsx rename to frontend-temp/src/pages/pc/public/schedule/sections/YoutubeSection.jsx diff --git a/frontend-temp/src/pages/schedule/sections/index.js b/frontend-temp/src/pages/pc/public/schedule/sections/index.js similarity index 100% rename from frontend-temp/src/pages/schedule/sections/index.js rename to frontend-temp/src/pages/pc/public/schedule/sections/index.js diff --git a/frontend-temp/src/pages/schedule/sections/utils.js b/frontend-temp/src/pages/pc/public/schedule/sections/utils.js similarity index 100% rename from frontend-temp/src/pages/schedule/sections/utils.js rename to frontend-temp/src/pages/pc/public/schedule/sections/utils.js diff --git a/frontend-temp/src/pages/schedule/index.js b/frontend-temp/src/pages/schedule/index.js deleted file mode 100644 index 45e2600..0000000 --- a/frontend-temp/src/pages/schedule/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export { default as PCSchedule } from './pc/Schedule'; -export { default as MobileSchedule } from './mobile/Schedule'; -export { default as PCScheduleDetail } from './pc/ScheduleDetail'; -export { default as MobileScheduleDetail } from './mobile/ScheduleDetail'; -export { default as PCBirthday } from './pc/Birthday'; -export { default as MobileBirthday } from './mobile/Birthday'; diff --git a/frontend-temp/src/components/schedule/confetti.js b/frontend-temp/src/utils/confetti.js similarity index 100% rename from frontend-temp/src/components/schedule/confetti.js rename to frontend-temp/src/utils/confetti.js diff --git a/frontend-temp/src/utils/index.js b/frontend-temp/src/utils/index.js index 02f9ee2..843080c 100644 --- a/frontend-temp/src/utils/index.js +++ b/frontend-temp/src/utils/index.js @@ -54,3 +54,6 @@ export { groupSchedulesByDate, countByCategory, } from './schedule'; + +// 애니메이션 관련 +export { fireBirthdayConfetti } from './confetti';