Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Big refactor #166

Closed
wants to merge 3 commits into from
Closed

Big refactor #166

wants to merge 3 commits into from

Conversation

hbrooks
Copy link
Collaborator

@hbrooks hbrooks commented Jan 24, 2024

  • Remove the unused concept of "modes" from our single page web app
  • DRY out the code by removing AuthError and using the Error component everywhere
  • move some components that are used in multiple pages over to src/components/shared/
  • convert some functions definitions from using function to using arrow function syntax

Copy link

vercel bot commented Jan 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
talk-form-ai ✅ Ready (Inspect) Visit Preview Jan 24, 2024 9:13pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small fixes required, otherwise good

Summary:

This PR refactors the codebase by removing 'modes', replacing AuthError with Error, moving some components to a shared directory, and converting function definitions to arrow function syntax.

Key points:

  • Removed the concept of 'modes' from the single page web app
  • Deleted AuthError and replaced it with Error component
  • Moved some components to src/components/shared/
  • Converted function definitions to arrow function syntax
  • Changes spread across multiple files including SignInForm.tsx, SignUpForm.tsx, Home.tsx, ResponsesTable.tsx, Error.tsx, and home.tsx

Generated with ❤️ by ellipsis.dev

<form
className="space-y-6"
action="#"
method="POST"
onSubmit={onFormSubmit}
onSubmit={() => onFormSubmit}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onFormSubmit function is not being called correctly. It should be passed as a reference, not invoked. Change onSubmit={() => onFormSubmit} to onSubmit={onFormSubmit}.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellipsis-dev fix it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellipsis-dev fix it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asdasd

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellipsis-dev fix it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asd

@@ -40,7 +40,7 @@ export default function SignInForm() {

return (
<>
{error && <ErrorAlert error={error} />}
{error && <Error error={error} session={null}/>}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Error component is being used with a session prop set to null. This might cause issues if the Error component expects a valid session. Please ensure that the Error component can handle a null session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant