mirror of
https://github.com/documenso/documenso.git
synced 2025-11-23 05:01:54 +10:00
feat: add trpc route to send emails
This commit is contained in:
24
apps/web/src/app/send/page.tsx
Normal file
24
apps/web/src/app/send/page.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user