feat: add trpc route to send emails

This commit is contained in:
Ephraim Atta-Duncan
2023-06-19 16:33:30 +00:00
parent aa740864b8
commit bc11abda08
11 changed files with 1095 additions and 4 deletions

View File

@ -0,0 +1,24 @@
'use client';
import React from 'react';
import { trpc } from '@documenso/trpc/react';
export default function Send() {
const { mutateAsync: sendMail } = trpc.document.sendEmail.useMutation();
return (
<div className="p-20">
<button
className="rounded-md border-2 border-solid border-black px-4 py-2 text-2xl"
onClick={async () => {
console.log('clicked');
await sendMail({ email: 'duncan@documenso.com' });
}}
>
Send
</button>
</div>
);
}