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

first solution #615

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

first solution #615

wants to merge 2 commits into from

Conversation

Clover247
Copy link

Copy link

@OlegPopovych OlegPopovych 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!
Look at the few suggestions.

<div className="block">
<div className="columns is-desktop is-flex-direction-row-reverse">
<div className="column is-7-tablet is-narrow-desktop">
<PeopleFilters />

Choose a reason for hiding this comment

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

Hide this component till you have people data

Choose a reason for hiding this comment

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

@Clover247 check this comment please

<a className="is-active" href="#/people">All</a>
<a className="" href="#/people?sex=m">Male</a>
<a className="" href="#/people?sex=f">Female</a>
{renderSexFilter(null, 'All')}

Choose a reason for hiding this comment

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

Something went wrong with their styles, check it

Copy link

@StasSokolov StasSokolov left a comment

Choose a reason for hiding this comment

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

Overall looks good, only few minor comments🔥

<div className="block">
<div className="columns is-desktop is-flex-direction-row-reverse">
<div className="column is-7-tablet is-narrow-desktop">
<PeopleFilters />

Choose a reason for hiding this comment

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

@Clover247 check this comment please

</p>
)}

{!people.length && !isLoading ? (

Choose a reason for hiding this comment

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

Suggested change
{!people.length && !isLoading ? (
{!people.length ? (

redundant in this case

Comment on lines 26 to 33
person.name.toLowerCase().includes(
filters.query?.toLowerCase().trim() as string,
)
|| person.fatherName?.toLowerCase().includes(
filters.query?.toLowerCase().trim() as string,
)
|| person.motherName?.toLowerCase().includes(
filters.query?.toLowerCase().trim() as string,

Choose a reason for hiding this comment

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

.toLowerCase().includes(filters.query?.toLowerCase().trim() as string)

don't repeat yourself, let's create separated function helper for this


if (sort.sortBy) {
switch (sort.sortBy) {
case 'died':

Choose a reason for hiding this comment

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

please create enum for this types and reuse

Copy link

@StasSokolov StasSokolov left a comment

Choose a reason for hiding this comment

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

Looks good to me, i'm approving it🔥

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