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

Full code review changes #222

Merged
merged 7 commits into from
Oct 25, 2023
Merged

Full code review changes #222

merged 7 commits into from
Oct 25, 2023

Conversation

manovotny
Copy link
Collaborator

@manovotny manovotny commented Oct 25, 2023

Great job on this, everyone! 🎉 I didn't find much, but here's a few things that popped out to me when evaluating the entire app from start to finish.

Also, there's quite a few things that are in public and app root that shouldn't be there if this is the "final form". I get why they are there for now, but they should be deleted when we break things up into chapters.

@vercel
Copy link

vercel bot commented Oct 25, 2023

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

Name Status Preview Comments Updated (UTC)
next-learn-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2023 2:13pm
next-learn-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2023 2:13pm
next-seo-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2023 2:13pm

const [invoice, customers] = await Promise.all([
fetchInvoiceById(id),
fetchCustomers(),
]);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Any reason we shouldn't be fetching in parallel here?

@@ -105,7 +105,7 @@ export async function updateInvoice(prevState: State, formData: FormData) {
}

export async function deleteInvoice(formData: FormData) {
throw new Error('Failed to Delete Invoice');
// throw new Error('Failed to Delete Invoice');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Feels like this should be deleted. If this is the "final form" of the app, then it should be in a fully working state. This throw, if a part of the course, should exist in a lower chapter, but not here, IMO.

</svg>
<GlobeAltIcon className="h-12 w-12 rotate-[15deg]" />
<p className="text-[44px] ">Acme</p>
</div>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Logo could be dramatically simplified using a Heroicon and rotating it just a touch. :chef-kiss:

Copy link
Collaborator

Choose a reason for hiding this comment

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

:chef-kiss:

@@ -1,38 +0,0 @@
import React from 'react';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Duplicate and unused logo.

-moz-appearance: textfield;
appearance: textfield;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved to global CSS instead of an inline style in React.

@@ -73,7 +73,6 @@ export default function Form({ customers }: { customers: CustomerField[] }) {
placeholder="Enter USD amount"
className="peer block w-full rounded-md border border-gray-200 py-2 pl-10 text-sm outline-2 placeholder:text-gray-500"
aria-describedby="amount-error"
style={{ MozAppearance: 'textfield' } as React.CSSProperties}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved to global CSS.

@@ -81,7 +81,6 @@ export default function EditInvoiceForm({
placeholder="Enter USD amount"
className="peer block w-full rounded-md border border-gray-200 py-2 pl-10 text-sm outline-2 placeholder:text-gray-500"
aria-describedby="amount-error"
style={{ MozAppearance: 'textfield' } as React.CSSProperties}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved to global CSS.

dashboard/README.md Outdated Show resolved Hide resolved
dashboard/README.md Outdated Show resolved Hide resolved
delbaoliveira
delbaoliveira previously approved these changes Oct 25, 2023
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.

3 participants