-
Notifications
You must be signed in to change notification settings - Fork 21
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
Big refactor #166
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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 withError
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
, andhome.tsx
Generated with ❤️ by ellipsis.dev
<form | ||
className="space-y-6" | ||
action="#" | ||
method="POST" | ||
onSubmit={onFormSubmit} | ||
onSubmit={() => onFormSubmit} |
There was a problem hiding this comment.
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}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ellipsis-dev fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ellipsis-dev fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asdasd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ellipsis-dev fix it
There was a problem hiding this comment.
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}/>} |
There was a problem hiding this comment.
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.
AuthError
and using theError
component everywheresrc/components/shared/
function
to using arrow function syntax