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

Develop #511

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Develop #511

wants to merge 8 commits into from

Conversation

voronine
Copy link

@voronine voronine commented Oct 4, 2023

Copy link

@roman-mirzoian roman-mirzoian left a comment

Choose a reason for hiding this comment

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

Good job, but there is quite a bit of work to be done.
There are also currently several problems with the application itself:

  1. When switching to the People page, both the loader and the people data will be renedred at the same time:
    https://gyazo.com/d715d2c8a2717835cc280ab49675c0e9
  2. Sorting does not work:
    https://gyazo.com/a87eb63dfd784c296bee21703737795c

src/components/Navbar.tsx Outdated Show resolved Hide resolved
src/components/PeopleFilters.tsx Outdated Show resolved Hide resolved
src/components/PersonPage.tsx Outdated Show resolved Hide resolved
src/components/PersonPage.tsx Outdated Show resolved Hide resolved
src/pages/PeoplePage.tsx Outdated Show resolved Hide resolved
src/store/PeopleContext.tsx Outdated Show resolved Hide resolved
src/utils/preparedPeople.tsx Outdated Show resolved Hide resolved
src/utils/preparedPeople.tsx Outdated Show resolved Hide resolved
Copy link

@BudnikOleksii BudnikOleksii left a comment

Choose a reason for hiding this comment

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

Good work 👍
But, some fixes should be done. Check the comments.
When there are no people found by criteria, you should show a message to notify the user.
Your version:
image

The working example:
image

src/components/HomePage.tsx Show resolved Hide resolved
src/pages/HomePage.tsx Outdated Show resolved Hide resolved
src/pages/NotFoundPage.tsx Show resolved Hide resolved
src/store/PeopleContext.tsx Outdated Show resolved Hide resolved
src/utils/preparedPeople.tsx Outdated Show resolved Hide resolved
@voronine voronine requested a review from BudnikOleksii October 9, 2023 19:48
Copy link

@roman-mirzoian roman-mirzoian left a comment

Choose a reason for hiding this comment

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

#511 (review) - not fixed 😢
image

src/pages/HomePage.tsx Outdated Show resolved Hide resolved
Copy link

@BudnikOleksii BudnikOleksii left a comment

Choose a reason for hiding this comment

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

Good work 👍
But, get rid of setTimeout as I mentioned in the comment

src/components/HomePage.tsx Show resolved Hide resolved

Choose a reason for hiding this comment

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

You still have the same page in the components folder, don't forget to get rid of it:
image

Comment on lines +36 to +46
setTimeout(async () => {
try {
const peopleFromServer = await getPeople();

setPeople(getPreparedPeople(peopleFromServer));
} catch (error) {
setIsError(true);
} finally {
setIsLoading(false);
}
}, 1000);

Choose a reason for hiding this comment

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

Why do you fetch in the setTimeout callback?
It doesn't make any sense. Get rid of a timeout

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