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);
|
useCaptureException(error);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<html lang="en">
|
||||||
|
<body>
|
||||||
|
<RootProviders>
|
||||||
|
<GlobalErrorPageContent reset={reset} />
|
||||||
|
</RootProviders>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
function GlobalErrorPageContent({ reset }: { reset: () => void }) {
|
||||||
const user = useUser();
|
const user = useUser();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<RootProviders>
|
|
||||||
<div className={'flex h-screen flex-1 flex-col'}>
|
<div className={'flex h-screen flex-1 flex-col'}>
|
||||||
<SiteHeader user={user.data} />
|
<SiteHeader user={user.data} />
|
||||||
|
|
||||||
@@ -61,11 +70,7 @@ const GlobalErrorPage = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={'flex space-x-4'}>
|
<div className={'flex space-x-4'}>
|
||||||
<Button
|
<Button className={'w-full'} variant={'default'} onClick={reset}>
|
||||||
className={'w-full'}
|
|
||||||
variant={'default'}
|
|
||||||
onClick={reset}
|
|
||||||
>
|
|
||||||
<ArrowLeft className={'mr-2 h-4'} />
|
<ArrowLeft className={'mr-2 h-4'} />
|
||||||
|
|
||||||
<Trans i18nKey={'common:goBack'} />
|
<Trans i18nKey={'common:goBack'} />
|
||||||
@@ -83,10 +88,7 @@ const GlobalErrorPage = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</RootProviders>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|
||||||
export default GlobalErrorPage;
|
export default GlobalErrorPage;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "next-supabase-saas-kit-turbo",
|
"name": "next-supabase-saas-kit-turbo",
|
||||||
"version": "2.18.1",
|
"version": "2.18.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
Reference in New Issue
Block a user