mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 16:51:38 +10:00
sign pasge basics
This commit is contained in:
@ -1,14 +1,11 @@
|
|||||||
import prisma from "@documenso/prisma";
|
import prisma from "@documenso/prisma";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import { ReactElement, useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import Layout from "../../../components/layout";
|
|
||||||
import Logo from "../../../components/logo";
|
|
||||||
import { NextPageWithLayout } from "../../_app";
|
import { NextPageWithLayout } from "../../_app";
|
||||||
import { Router } from "next/router";
|
|
||||||
import { ReadStatus } from "@prisma/client";
|
import { ReadStatus } from "@prisma/client";
|
||||||
import SignaturePad from "signature_pad";
|
import SignaturePad from "signature_pad";
|
||||||
|
|
||||||
const SignPage: NextPageWithLayout = () => {
|
const SignPage: NextPageWithLayout = (props: any) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const canvas: any = document.querySelector("canvas");
|
const canvas: any = document.querySelector("canvas");
|
||||||
const signaturePad = new SignaturePad(canvas);
|
const signaturePad = new SignaturePad(canvas);
|
||||||
@ -21,6 +18,7 @@ const SignPage: NextPageWithLayout = () => {
|
|||||||
Hello, please sign at the dotted line.
|
Hello, please sign at the dotted line.
|
||||||
<canvas className="mx-auto bg-neon"></canvas>
|
<canvas className="mx-auto bg-neon"></canvas>
|
||||||
<hr></hr>
|
<hr></hr>
|
||||||
|
{/* todo read/ sign version of editor => flag or own component */}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -37,10 +35,22 @@ export async function getServerSideProps(context: any) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const document = await prisma.recipient
|
||||||
|
.findFirstOrThrow({
|
||||||
|
where: {
|
||||||
|
token: recipientToken,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.Document();
|
||||||
|
|
||||||
|
// todo get r
|
||||||
|
|
||||||
// todo sign ui
|
// todo sign ui
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {},
|
props: {
|
||||||
|
document: document,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user