fix: add back global-error.tsx (#18692)

This commit is contained in:
Benny Joo authored and GitHub committed 2025-01-15 16:55:43 +00:00
1 parent c581456586
commit 7897e14273
2 files changed
+21 -3

No files matched your search

+3 -3
View File
@@ -12,12 +12,12 @@ import { ErrorPage } from "@components/error/error-page";
const log = logger.getSubLogger({ prefix: ["[error]"] });
type ErrorProps = {
export type ErrorProps = {
error: Error;
reset: () => void;
reset?: () => void;
};
export default function Error({ error, reset }: ErrorProps) {
export default function Error({ error }: ErrorProps) {
React.useEffect(() => {
log.error(error);
+18
View File
@@ -0,0 +1,18 @@
"use client";
import { type NextPage } from "next";
import CustomError from "./error";
import type { ErrorProps } from "./error";
export const GlobalError: NextPage<ErrorProps> = (props) => {
return (
<html>
<body>
<CustomError {...props} />
</body>
</html>
);
};
export default GlobalError;