File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export default function ContactForm() {
33
33
34
34
// A contact form with a name, email, and message using tailwind css.
35
35
// TODO: Add a better validation both UI, logic, and backend.
36
+ // TODO: Add a display of errors if they occur.
36
37
return (
37
38
< div id = "contact" className = "min-h-screen grid place-items-center content-center p-4" >
38
39
< div className = "max-w-8xl w-full flex flex-wrap justify-center" >
@@ -55,6 +56,7 @@ export default function ContactForm() {
55
56
</ label >
56
57
< textarea required className = "appearance-none block w-full bg-gray-200 h-40 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" id = "grid-message" type = "text" placeholder = "Lets get coffee." ref = { messageRef } />
57
58
{ success && < Alert type = "success" > Message sent!</ Alert > }
59
+
58
60
</ div >
59
61
</ div >
60
62
< div className = "flex items-center justify-center" >
Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ import sendgrid from '@sendgrid/mail';
3
3
sendgrid . setApiKey ( process . env . SENDGRID_API_KEY ) ;
4
4
5
5
export default async function handler ( req , res ) {
6
- return res . status ( 200 ) . json ( {
7
- statusCode : 200 ,
8
- body : 'Hello, world!' ,
9
- } ) ;
10
6
if ( req . method === 'POST' ) {
11
7
const { name, email, message } = req . body ;
12
8
You can’t perform that action at this time.
0 commit comments