We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4f9e7d commit ea1a529Copy full SHA for ea1a529
www/src/pages/components/LandingPage.tsx
@@ -7,15 +7,15 @@ import Blogs from './Blogs';
7
import { useState } from 'react';
8
import { trpc } from '../../utils/trpc';
9
10
-export default function LandingPage(): JSX.Element {
+export default function LandingPage() {
11
const [name, setName] = useState('');
12
const [email, setEmail] = useState('');
13
+ const { mutate } = trpc.user.createUser.useMutation();
14
15
const handleSubmit = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
16
e.preventDefault();
17
// grab the information of name and email
18
// bundle those together to be an object to be sent to backend
- const { mutate } = trpc.user.createUser.useMutation();
19
mutate({name, email});
20
}
21
0 commit comments