Skip to content

Commit

Permalink
🚑 [hotfix] : 서비스 종료 알림
Browse files Browse the repository at this point in the history
  • Loading branch information
nayoung3669 committed Jun 1, 2024
1 parent b5d1062 commit e3c53ba
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
33 changes: 32 additions & 1 deletion public/sw.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 4 additions & 11 deletions src/app/(route)/error.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
'use client'

import ErrorpageFirstContainer from '@/_components/errorpage/containers/ErrorpageFirstContainer'
import ErrorpageSecondContainer from '@/_components/errorpage/containers/ErrorpageSecondContainer'
import Image from 'next/image'
import { useRouter } from 'next/navigation'
import errorImage from 'public/illustration/common/error/network.png'
import { useEffect } from 'react'

const Error = () => {
const router = useRouter()

useEffect(() => {
router.push('/login')
}, [])
return (
<section className="w-full h-screen flex flex-col items-center justify-center z-50">
<Image src={errorImage} alt="image" className="w-[296px] h-[170px]" />
<ErrorpageFirstContainer />
<ErrorpageSecondContainer />
<div className="flex flex-col gap-2 mt-5 text-sm text-gray-500 w-full text-center">
<p>서비스가 종료되었습니다.</p>
<p>무드메이트를 사랑해주셔서 감사합니다 💗</p>
</div>
</section>
)
}
Expand Down
21 changes: 3 additions & 18 deletions src/app/(route)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
'use client'

import Loading from '@/_components/common/Loading'
import { getCookie } from '@/utils/cookieutils'
import { useRouter } from 'next/navigation'
import { useEffect } from 'react'

export default function Root() {
const route = useRouter()
useEffect(() => {
const accessToken = getCookie('accessToken')
const refreshToken = getCookie('refreshToken')

if ((accessToken || refreshToken) !== undefined) {
route.push('/main')
} else {
route.push('/login')
}
}, [route])
return (
<main>
<Loading />
</main>
)
throw Error // 서비스 종료
}, [])
return <main></main>
}

0 comments on commit e3c53ba

Please sign in to comment.