Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
cfortuner authored Aug 10, 2023
1 parent ced97ba commit b583fa1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 (
<>
Expand All @@ -47,6 +68,11 @@ name=
<link rel="icon" href="/favicon.ico" />
</Head>
<main className="h-full p-4">
// JSX props issues
<div className='foo'></div>



<div className="text-2xl font-semibold">Test your Empathy!</div>
<SmileyFace />
<Chat />
Expand Down

0 comments on commit b583fa1

Please sign in to comment.