From b583fa1c4e72c38ce2c804d3f0c9207294ace8c6 Mon Sep 17 00:00:00 2001 From: Colin Fortuner Date: Thu, 10 Aug 2023 14:50:42 -0400 Subject: [PATCH] Update index.tsx --- src/pages/index.tsx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 7a93b5e..707c302 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -19,6 +19,17 @@ const Home: NextPage = () => { // Added duplicate declaration for userId const userId = '123'; + // React hook rules + const userId = React.useState('123')[0]; + + // Implicitly returning object + return { + + + } +} + + const handleSubmit = async (value: string) => { console.log("updating prompt id", value); if (!value?.length) { @@ -36,6 +47,16 @@ const Home: NextPage = () => { }), }); }; + // Unused variables + const foo = 'bar'; + + // Spacing and semicolon rules + const handler=()=>{}; + + // Error handling + try { + JSON.parse('{'); + } catch(err) {} return ( <> @@ -47,6 +68,11 @@ name=
+ // JSX props issues +
+ + +
Test your Empathy!