-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ecency/bugfix/bugsnag
Turned off bugsnag
- Loading branch information
Showing
5 changed files
with
113 additions
and
98 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"use client"; // Error boundaries must be Client Components | ||
|
||
export default function GlobalError({ | ||
error, | ||
reset | ||
}: { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}) { | ||
return ( | ||
// global-error must include html and body tags | ||
<html> | ||
<body> | ||
<h2>Something went wrong!</h2> | ||
<button onClick={() => reset()}>Try again</button> | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import { PropsWithChildren } from "react"; | ||
import { PushNotificationsProvider } from "@/features/push-notifications"; | ||
import { ClientProviders } from "@/app/client-providers"; | ||
import { BugsnagErrorBoundary } from "@/features/bugsnag"; | ||
|
||
export default function Providers({ children }: PropsWithChildren) { | ||
return ( | ||
<BugsnagErrorBoundary> | ||
<ClientProviders> | ||
<PushNotificationsProvider>{children}</PushNotificationsProvider> | ||
</ClientProviders> | ||
</BugsnagErrorBoundary> | ||
<ClientProviders> | ||
<PushNotificationsProvider>{children}</PushNotificationsProvider> | ||
</ClientProviders> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters