diff --git a/package-lock.json b/package-lock.json index adb61f7..f98d15f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "react-kakao-maps-sdk": "^1.1.27", "swiper": "^11.1.15", "tailwind-merge": "^2.5.3", + "tailwind-scrollbar-hide": "^1.1.7", "zustand": "^5.0.0" }, "devDependencies": { @@ -14478,6 +14479,11 @@ "url": "https://github.com/sponsors/dcastil" } }, + "node_modules/tailwind-scrollbar-hide": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/tailwind-scrollbar-hide/-/tailwind-scrollbar-hide-1.1.7.tgz", + "integrity": "sha512-X324n9OtpTmOMqEgDUEA/RgLrNfBF/jwJdctaPZDzB3mppxJk7TLIDmOreEDm1Bq4R9LSPu4Epf8VSdovNU+iA==" + }, "node_modules/tailwindcss": { "version": "3.4.13", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.13.tgz", diff --git a/package.json b/package.json index 360476f..e3d5448 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "react-kakao-maps-sdk": "^1.1.27", "swiper": "^11.1.15", "tailwind-merge": "^2.5.3", + "tailwind-scrollbar-hide": "^1.1.7", "zustand": "^5.0.0" }, "devDependencies": { diff --git a/src/app/activity/page.tsx b/src/app/activity/page.tsx index c79d63f..dbf7137 100644 --- a/src/app/activity/page.tsx +++ b/src/app/activity/page.tsx @@ -81,7 +81,6 @@ export default function ActivityPage() { } if (!startTime) { - // 새로운 타이머 시작 startTime = now.toString() localStorage.setItem('startTime', startTime) } @@ -96,18 +95,18 @@ export default function ActivityPage() { const remainingTimeMsRm = spareTimeMs - elapsedRm if (remainingTimeMsRm <= 0) { - // 시간이 다 되었을 때 처리 setIsTimeUp(true) - setElapsedTime(Math.ceil(elapsed / 60000)) // 경과 시간을 분 단위로 저장 + setElapsedTime(Math.ceil(elapsed / 60000)) if (intervalId.current !== null) { clearInterval(intervalId.current) intervalId.current = null } - } else { - // 남은 시간 로그 (디버깅 용도) - const remainingSeconds = Math.ceil(remainingTimeMsRm / 1000) - console.log(`남은 시간: ${remainingSeconds}초`) } + // else { + // // 남은 시간 로그 (디버깅 용도) + // const remainingSeconds = Math.ceil(remainingTimeMsRm / 1000) + // console.log(`남은 시간: ${remainingSeconds}초`) + // } } if (elapsed >= spareTimeMs) { @@ -205,8 +204,6 @@ export default function ActivityPage() { } } - console.log('id', activityId) - return ( <> {isTimeUp ? ( @@ -274,7 +271,7 @@ export default function ActivityPage() { {selectedActivityData?.title() - const [isloading, setIsLoading] = useState(true) const activeType = getActiveType(activityType) const postData = { spareTime: parseInt(spareTime, 10), @@ -67,7 +68,7 @@ export default function ChoiceSuggestion({ const fetchData = async () => { console.log('보내는 데이터 확인', postData) try { - setIsLoading(true) + setIsSuggestLoading(true) const accessToken = Cookies.get('accessToken') @@ -98,7 +99,7 @@ export default function ChoiceSuggestion({ } catch (error) { console.error('Error sending POST request:', error) } finally { - setIsLoading(false) + setIsSuggestLoading(false) } } @@ -122,11 +123,11 @@ export default function ChoiceSuggestion({ return (
- {isloading ? ( + {isSuggestLoading ? ( ) : ( <> -
+

조각조각이 {nickname} 님에게 @@ -161,10 +162,10 @@ export default function ChoiceSuggestion({ className="mt-10" />
-

+

{cardData.content}

-

+

{cardData.title}

@@ -173,7 +174,7 @@ export default function ChoiceSuggestion({ ))} -
+

suggest_waiting diff --git a/src/app/home/sg-activity/page.tsx b/src/app/home/sg-activity/page.tsx index 3b86a1d..285c6e9 100644 --- a/src/app/home/sg-activity/page.tsx +++ b/src/app/home/sg-activity/page.tsx @@ -24,7 +24,7 @@ export default function SuggestActivity() { const [selectedActivity, setSeletedActivity] = useState() const [activityLink, setActivityLink] = useState('') const [postActivityType, setPostActivityType] = useState('') - const { spareTime, setSpareTime, address } = useActivityStore() + const { spareTime, setSpareTime, address, reset } = useActivityStore() const router = useRouter() const handleBack = () => { @@ -76,6 +76,7 @@ export default function SuggestActivity() { 'selectedActivity', JSON.stringify(seletedActivityData), ) + reset() router.push('/activity') } nextStep = step + 1 @@ -132,6 +133,7 @@ export default function SuggestActivity() { > setError: Dispatch> setText: Dispatch> diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 6442ac4..5dd382a 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,6 +4,7 @@ import { GlobalErrorBoundary } from '@/react-utils/ErrorBoundary' import { Suspense } from 'react' import { QueryProvider } from '@/lib' import { cn } from '@/util' +import MobileWrapper from '@/components/MobileWrapper/MobileWrapper' import { pretendard, wavvepado } from '../../public/fonts' export const metadata: Metadata = { @@ -21,7 +22,9 @@ export default function RootLayout({ 에러가 발생했어요 !
}> 로딩 중입니다...
}> - {children} + + {children} + diff --git a/src/app/page.tsx b/src/app/page.tsx index 5917006..f270d53 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,7 @@ 'use client' import { useEffect, useState } from 'react' +import { useRouter } from 'next/navigation' import { motion } from 'framer-motion' import Image from 'next/image' import SplashLogoNew from '@/components/Icons/SplashLogoNew' @@ -10,8 +11,14 @@ import OauthBtn from '@/components/Oauth/OauthBtn' export default function Home() { const [isSplash, setIsSplash] = useState(true) const [logoColor, setlogoColor] = useState('white') + const { push } = useRouter() useEffect(() => { + const userInfo = localStorage.getItem('userInfo') + if (userInfo) { + push('/home') + } + const timer = setTimeout(() => { setIsSplash(false) }, 1200) @@ -27,7 +34,7 @@ export default function Home() { }, []) return ( -
+
+ +
+ {children} +
+
+ ) +} diff --git a/src/components/ui/HomeHeader.tsx b/src/components/ui/HomeHeader.tsx index c69a48c..6843dbe 100644 --- a/src/components/ui/HomeHeader.tsx +++ b/src/components/ui/HomeHeader.tsx @@ -18,13 +18,17 @@ export default function HomeHeader({ children, title }: HomeHeaderProps) {
-
+
+