mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 10:11:35 +10:00
Revert "INCOMPLETE: refactor signature pad and input into a single component"
This reverts commit e17e4566cd.
This commit is contained in:
@ -1,24 +1,19 @@
|
||||
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
|
||||
|
||||
import { SigningProvider } from '~/app/(signing)/sign/[token]/provider';
|
||||
import { ProfileForm } from '~/components/forms/profile';
|
||||
|
||||
export default async function ProfileSettingsPage() {
|
||||
const { user } = await getRequiredServerComponentSession();
|
||||
|
||||
return (
|
||||
<SigningProvider email={user.email} fullName={user.name} signature={user.signature}>
|
||||
<div>
|
||||
<h3 className="text-2xl font-semibold">Profile</h3>
|
||||
<div>
|
||||
<h3 className="text-2xl font-semibold">Profile</h3>
|
||||
|
||||
<p className="text-muted-foreground mt-2 text-sm">
|
||||
Here you can edit your personal details.
|
||||
</p>
|
||||
<p className="text-muted-foreground mt-2 text-sm">Here you can edit your personal details.</p>
|
||||
|
||||
<hr className="my-4" />
|
||||
<hr className="my-4" />
|
||||
|
||||
<ProfileForm user={user} className="max-w-xl" />
|
||||
</div>
|
||||
</SigningProvider>
|
||||
<ProfileForm user={user} className="max-w-xl" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -17,8 +17,6 @@ import { Label } from '@documenso/ui/primitives/label';
|
||||
import { SignaturePad } from '@documenso/ui/primitives/signature-pad';
|
||||
import { useToast } from '@documenso/ui/primitives/use-toast';
|
||||
|
||||
import { useRequiredSigningContext } from '~/app/(signing)/sign/[token]/provider';
|
||||
|
||||
import { FormErrorMessage } from '../form/form-error-message';
|
||||
|
||||
export const ZProfileFormSchema = z.object({
|
||||
@ -38,8 +36,6 @@ export const ProfileForm = ({ className, user }: ProfileFormProps) => {
|
||||
|
||||
const { toast } = useToast();
|
||||
|
||||
const { signature, setSignature } = useRequiredSigningContext();
|
||||
|
||||
const {
|
||||
register,
|
||||
control,
|
||||
@ -125,8 +121,6 @@ export const ProfileForm = ({ className, user }: ProfileFormProps) => {
|
||||
containerClassName="rounded-lg border bg-background"
|
||||
defaultValue={user.signature ?? undefined}
|
||||
onChange={(v) => onChange(v ?? '')}
|
||||
signature={signature}
|
||||
setSignature={setSignature}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user