* refactor(auth): replace Supabase `User` type with new `JWTUserData` type across the codebase - Replaced usage of Supabase's `User` type with the newly defined `JWTUserData` type for better type mapping and alignment with JWT claims. - Refactored session-related components and hooks (`useUser`, `requireUser`) to use the updated user structure. - Updated Supabase client keys to use `publicKey` instead of `anonKey`. - Adjusted multi-factor authentication logic and components to use `aal` and additional properties. - Applied consistent naming for Supabase secret key functions. - Incremented version to 2.12.0. - Introduced a new `deprecated` property in the `EnvVariableModel` type to handle deprecated environment variables. - Updated the `EnvList` component to display a warning badge for deprecated variables, including reason and alternative suggestions. - Enhanced filtering logic to allow users to toggle the visibility of deprecated variables. - Added new deprecated variables for Supabase keys with appropriate reasons and alternatives. - Added support for filtering deprecated environment variables in the `FilterSwitcher` component. - Updated the `Summary` component to display a badge for the count of deprecated variables. - Introduced a button to filter and display only deprecated variables. - Adjusted filtering logic to include deprecated variables in the overall state management. add BILLING_MODE configuration to environment variables - Introduced a new environment variable `BILLING_MODE` to configure billing options for the application. - The variable supports two values: `subscription` and `one-time`. - Marked as deprecated with a reason indicating that this configuration is no longer required, as billing mode is now automatically determined. - Added validation logic for the new variable to ensure correct value parsing.
82 lines
2.2 KiB
TypeScript
82 lines
2.2 KiB
TypeScript
'use client';
|
|
|
|
import Link from 'next/link';
|
|
|
|
import { ArrowLeft, MessageCircle } from 'lucide-react';
|
|
|
|
import { useCaptureException } from '@kit/monitoring/hooks';
|
|
import { useUser } from '@kit/supabase/hooks/use-user';
|
|
import { Button } from '@kit/ui/button';
|
|
import { Heading } from '@kit/ui/heading';
|
|
import { Trans } from '@kit/ui/trans';
|
|
|
|
import { SiteHeader } from '~/(marketing)/_components/site-header';
|
|
|
|
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} />
|
|
|
|
<div
|
|
className={
|
|
'container m-auto flex w-full flex-1 flex-col items-center justify-center'
|
|
}
|
|
>
|
|
<div className={'flex flex-col items-center space-y-8'}>
|
|
<div>
|
|
<h1 className={'font-heading text-9xl font-semibold'}>
|
|
<Trans i18nKey={'common:errorPageHeading'} />
|
|
</h1>
|
|
</div>
|
|
|
|
<div className={'flex flex-col items-center space-y-8'}>
|
|
<div
|
|
className={
|
|
'flex max-w-xl flex-col items-center gap-y-2 text-center'
|
|
}
|
|
>
|
|
<div>
|
|
<Heading level={2}>
|
|
<Trans i18nKey={'common:genericError'} />
|
|
</Heading>
|
|
</div>
|
|
|
|
<p className={'text-muted-foreground text-lg'}>
|
|
<Trans i18nKey={'common:genericErrorSubHeading'} />
|
|
</p>
|
|
</div>
|
|
|
|
<div className={'flex space-x-4'}>
|
|
<Button className={'w-full'} variant={'default'} onClick={reset}>
|
|
<ArrowLeft className={'mr-2 h-4'} />
|
|
|
|
<Trans i18nKey={'common:goBack'} />
|
|
</Button>
|
|
|
|
<Button className={'w-full'} variant={'outline'} asChild>
|
|
<Link href={'/contact'}>
|
|
<MessageCircle className={'mr-2 h-4'} />
|
|
|
|
<Trans i18nKey={'common:contactUs'} />
|
|
</Link>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ErrorPage;
|