-
Notifications
You must be signed in to change notification settings - Fork 0
chore: function to form aplllied #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,12 @@ import type { AppProps } from 'next/app'; | |
|
||
import { Layout } from '@/layouts'; | ||
|
||
const App = ({ Component, pageProps }: AppProps) => ( | ||
<Layout> | ||
<Component {...pageProps} /> | ||
</Layout> | ||
); | ||
const App = ({ Component, pageProps }: AppProps) => { | ||
return ( | ||
<Layout> | ||
<Component {...pageProps} /> | ||
</Layout> | ||
); | ||
}; | ||
Comment on lines
+7
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can revert this |
||
|
||
export default App; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) { | |
if (req.method === 'POST') { | ||
const { name, email, guild, message } = req.body; | ||
const response = schema.safeParse(req.body); | ||
console.log(req.body); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove console log |
||
|
||
if (!response.success) { | ||
const { errors } = response.error; | ||
|
@@ -26,10 +27,14 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) { | |
const apiUrl = 'https://api.brevo.com/v3/smtp/email'; | ||
|
||
const emailData = { | ||
sender: { name, email }, | ||
sender: { | ||
name: 'Formularz', | ||
email: '[email protected]', | ||
replayTo: { email, name } | ||
}, | ||
to: [ | ||
{ | ||
email: 'kontakt@coderscrew.pl', | ||
email: 'jedrzej.ratajczak@coderscrew.pl', | ||
name: 'Coders Crew' | ||
} | ||
], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert changes in this file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would like to show some popup that will tell us if it failed or succeed.
react-toastify
is cool