Skip to content

Commit

Permalink
🎉 공통 에러 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
oaoong committed Nov 27, 2023
1 parent 582aad9 commit 9d46e15
Show file tree
Hide file tree
Showing 14 changed files with 192 additions and 348 deletions.
70 changes: 0 additions & 70 deletions src/app/(root)/(routes)/(home)/error.tsx

This file was deleted.

62 changes: 0 additions & 62 deletions src/app/(root)/(routes)/cards/[cardId]/modify/error.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions src/app/(root)/(routes)/cards/new/error.tsx

This file was deleted.

62 changes: 0 additions & 62 deletions src/app/(root)/(routes)/chatrooms/[chatRoomId]/error.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions src/app/(root)/(routes)/mypage/error.tsx

This file was deleted.

62 changes: 0 additions & 62 deletions src/app/(root)/(routes)/suggestions/[myCardId]/error.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/(root)/not-found.tsx

This file was deleted.

15 changes: 15 additions & 0 deletions src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use client'

import ErrorGateway from '@/components/domain/errors/ErrorGateway'

type ErrorPageProps = {
error: Error & { digest?: string }
reset: () => void
}

export default function GlobalError({
error,
reset,
}: Readonly<ErrorPageProps>) {
return <ErrorGateway error={error} reset={reset} />
}
18 changes: 0 additions & 18 deletions src/app/global-error.tsx

This file was deleted.

6 changes: 6 additions & 0 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react'
import NotFoundErrorTemplate from '@/components/domain/errors/NotFoundErrorTemplate'

export default function NotFound() {
return <NotFoundErrorTemplate />
}
Loading

0 comments on commit 9d46e15

Please sign in to comment.