Skip to content

Commit

Permalink
make global error server side
Browse files Browse the repository at this point in the history
  • Loading branch information
encryptedDegen committed Dec 20, 2024
1 parent 136d813 commit e28e3d6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/app/global-error.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
'use client'

import { useEffect } from 'react'
import { captureException } from '@sentry/nextjs'
import { default as NextError } from 'next/error'

interface GlobalErrorProps {
error: NextError & { digest?: string }
reset: () => void
}

const GlobalError: React.FC<GlobalErrorProps> = ({ error, reset }) => {
useEffect(() => {
captureException(error)
}, [error])

const GlobalError: React.FC<GlobalErrorProps> = ({ reset }) => {
return (
<html lang="en">
<body className="pt-40">
Expand Down

0 comments on commit e28e3d6

Please sign in to comment.