From 9f6e32c0c77d2f6e59efd0db03668feb129fc8c3 Mon Sep 17 00:00:00 2001 From: IAmNini Date: Mon, 21 Mar 2022 17:56:40 +0000 Subject: [PATCH 01/35] add a form but it doesn't work --- apps/film-and-tv-ratings/src/pages/Movie.tsx | 30 ++++++++++++++++++-- libs/site/package.json | 2 +- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/apps/film-and-tv-ratings/src/pages/Movie.tsx b/apps/film-and-tv-ratings/src/pages/Movie.tsx index 89bc250..af3cdd4 100644 --- a/apps/film-and-tv-ratings/src/pages/Movie.tsx +++ b/apps/film-and-tv-ratings/src/pages/Movie.tsx @@ -42,9 +42,13 @@ export function Movie({ itemId }: { itemId: string }) { }, }); + const { register, handleSubmit } = useForm(); + // const onSubmit = (data: any) => console.log(data); + const { id: username } = useUser(); const formHooks = useForm(); - const handleSubmit = async (values: UpsertReviewMutationVariables) => { + + const onSubmit = async (values: UpsertReviewMutationVariables) => { if (imdb_id) { console.log('submit', values); formHooks.reset(); @@ -89,7 +93,29 @@ export function Movie({ itemId }: { itemId: string }) { ))} )} - {/* form */} +
+

New Review

+
+ + +
+ +