chore: bump version to 2.18.2 and refactor GlobalErrorPage component
- Incremented application version from 2.18.1 to 2.18.2 in package.json. - Refactored GlobalErrorPage component to improve structure and readability, encapsulating the error content in a separate function and ensuring proper HTML semantics.
This commit is contained in:
@@ -22,12 +22,21 @@ const GlobalErrorPage = ({
|
||||
}) => {
|
||||
useCaptureException(error);
|
||||
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>
|
||||
<RootProviders>
|
||||
<GlobalErrorPageContent reset={reset} />
|
||||
</RootProviders>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
};
|
||||
|
||||
function GlobalErrorPageContent({ reset }: { reset: () => void }) {
|
||||
const user = useUser();
|
||||
|
||||
return (
|
||||
<html>
|
||||
<body>
|
||||
<RootProviders>
|
||||
<div className={'flex h-screen flex-1 flex-col'}>
|
||||
<SiteHeader user={user.data} />
|
||||
|
||||
@@ -61,11 +70,7 @@ const GlobalErrorPage = ({
|
||||
</div>
|
||||
|
||||
<div className={'flex space-x-4'}>
|
||||
<Button
|
||||
className={'w-full'}
|
||||
variant={'default'}
|
||||
onClick={reset}
|
||||
>
|
||||
<Button className={'w-full'} variant={'default'} onClick={reset}>
|
||||
<ArrowLeft className={'mr-2 h-4'} />
|
||||
|
||||
<Trans i18nKey={'common:goBack'} />
|
||||
@@ -83,10 +88,7 @@ const GlobalErrorPage = ({
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</RootProviders>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default GlobalErrorPage;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "next-supabase-saas-kit-turbo",
|
||||
"version": "2.18.1",
|
||||
"version": "2.18.2",
|
||||
"private": true,
|
||||
"sideEffects": false,
|
||||
"engines": {
|
||||
|
||||
Reference in New Issue
Block a user