) => {
+ e.preventDefault()
+
+ const formData = new FormData(e.currentTarget)
+ try {
+ await doRegister({
+ variables: {
+ email: formData.get('email') as string,
+ name: formData.get('name') as string,
+ },
+ })
+ } catch (err) {}
+ }
+
+ return (
+
+ Register
+
+
+ )
+}
+
+export default Register
diff --git a/src/components/UserPage/index.tsx b/src/components/UserPage/index.tsx
index 7a86e92..9635d05 100644
--- a/src/components/UserPage/index.tsx
+++ b/src/components/UserPage/index.tsx
@@ -1,14 +1,14 @@
import { useQuery } from '@apollo/client'
import React from 'react'
import { USER } from '../../apollo'
-import { User } from '../../apollo/typeDefs.gen'
+import { QueryUserArgs, User } from '../../apollo/typeDefs.gen'
-interface UserQuery {
+interface IUserQuery {
user: User
}
const UserPage: React.FC = () => {
- const { data, error, loading } = useQuery(USER)
+ const { data, error, loading } = useQuery(USER)
if (loading) return Loading...
if (error) return {error.message}