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

Filters #3

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Filters #3

wants to merge 11 commits into from

Conversation

GorlemZ
Copy link
Contributor

@GorlemZ GorlemZ commented Oct 2, 2023

No description provided.

@GorlemZ GorlemZ force-pushed the filters branch 2 times, most recently from 671106b to 4cd98ac Compare October 3, 2023 10:08
Copy link
Member

@federico-ercoles federico-ercoles left a comment

Choose a reason for hiding this comment

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

A couple of questions before reviewing the code:

  1. I see you have skipped the step of implementing the API call, is there a specific reason why?
  2. I also see you're not using formo as suggested for form management. I recommend having a look at using it, since it's our default stack choice.

@GorlemZ
Copy link
Contributor Author

GorlemZ commented Oct 4, 2023

Answ:

  1. planning on doing it as last step
  2. I'll do it asap!

@GorlemZ
Copy link
Contributor Author

GorlemZ commented Nov 3, 2023

Another day another api call

Copy link
Member

@federico-ercoles federico-ercoles left a comment

Choose a reason for hiding this comment

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

There are a few areas for improvement, see the specific comments for details.

A general feedback: here you have implemented both the filters and the detail page, where normally each one should be their own PR. You should try to have your PRs have as small a scope as possible, so that their purpose is more easily identifiable and the code is quicker to review and fix, if needed.

src/App.tsx Outdated Show resolved Hide resolved
src/api.tsx Outdated Show resolved Hide resolved
src/hooks.tsx Outdated Show resolved Hide resolved
src/hooks.tsx Outdated Show resolved Hide resolved
src/components/RestaurantPreview.tsx Outdated Show resolved Hide resolved
src/pages/RestaurantDetail.tsx Outdated Show resolved Hide resolved
src/pages/RestaurantDetail.tsx Outdated Show resolved Hide resolved
src/pages/RestaurantDetail.tsx Outdated Show resolved Hide resolved
src/pages/RestaurantDetail.tsx Outdated Show resolved Hide resolved
src/pages/RestaurantDetail.tsx Outdated Show resolved Hide resolved
@GorlemZ
Copy link
Contributor Author

GorlemZ commented Nov 20, 2023

I think I've managed all your observations :) I agree, I should have splitted this into more PRs for readability and speed on both of our sides. I'll learn from this, thanks!
I've managed to add the price filter (it's a small change, please be patient 🙃
Thanks

Copy link
Member

@federico-ercoles federico-ercoles left a comment

Choose a reason for hiding this comment

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

Looking good! 👍🏻

src/api.tsx Outdated
const radiusParamsString: string =
radius == 0 ? "900" : radius.toString() + "000";
const uri = `/api/search?sort_by=best_match&location=${location}&radius=${radiusParamsString}&${priceParamsString}`;
console.log(uri);
Copy link
Member

Choose a reason for hiding this comment

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

Leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep

@GorlemZ GorlemZ requested a review from gabro November 21, 2023 15:45
@gabro gabro removed their request for review January 22, 2024 15:31
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.

2 participants