Files
sign/apps/remix/app/components/embed/embed-authentication-required.tsx

36 lines
1.0 KiB
TypeScript
Raw Normal View History

2025-02-07 19:33:58 +11:00
import { Trans } from '@lingui/react/macro';
2025-02-03 23:56:27 +11:00
import { Alert, AlertDescription } from '@documenso/ui/primitives/alert';
import { SignInForm } from '~/components/forms/signin';
2025-02-04 22:25:11 +11:00
import { BrandingLogo } from '~/components/general/branding-logo';
2025-02-03 23:56:27 +11:00
export type EmbedAuthenticationRequiredProps = {
email?: string;
returnTo: string;
};
export const EmbedAuthenticationRequired = ({
email,
returnTo,
}: EmbedAuthenticationRequiredProps) => {
return (
<div className="flex min-h-[100dvh] w-full items-center justify-center">
<div className="flex w-full max-w-md flex-col">
2025-02-04 22:25:11 +11:00
<BrandingLogo className="h-8" />
2025-02-03 23:56:27 +11:00
<Alert className="mt-8" variant="warning">
<AlertDescription>
<Trans>
To view this document you need to be signed into your account, please sign in to
continue.
</Trans>
</AlertDescription>
</Alert>
<SignInForm className="mt-4" initialEmail={email} returnTo={returnTo} />
</div>
</div>
);
};