- Updated application version from 2.23.13 to 2.23.14 in package.json. - Refactored error handling components in web app to utilize a new ErrorPageContent component for improved code organization and readability. - Simplified error and not found page layouts by removing redundant code and enhancing localization keys for better user experience.
36 lines
818 B
TypeScript
36 lines
818 B
TypeScript
'use client';
|
|
|
|
import { useCaptureException } from '@kit/monitoring/hooks';
|
|
import { useUser } from '@kit/supabase/hooks/use-user';
|
|
|
|
import { SiteHeader } from '~/(marketing)/_components/site-header';
|
|
import { ErrorPageContent } from '~/components/error-page-content';
|
|
|
|
const ErrorPage = ({
|
|
error,
|
|
reset,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
reset: () => void;
|
|
}) => {
|
|
useCaptureException(error);
|
|
|
|
const user = useUser();
|
|
|
|
return (
|
|
<div className={'flex h-screen flex-1 flex-col'}>
|
|
<SiteHeader user={user.data} />
|
|
|
|
<ErrorPageContent
|
|
statusCode={'common:errorPageHeading'}
|
|
heading={'common:genericError'}
|
|
subtitle={'common:genericErrorSubHeading'}
|
|
backLabel={'common:goBack'}
|
|
reset={reset}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ErrorPage;
|