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 #1058

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

Develop #1058

wants to merge 6 commits into from

Conversation

ogchy
Copy link

@ogchy ogchy commented Sep 13, 2024

Copy link

@etojeDenys etojeDenys left a comment

Choose a reason for hiding this comment

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

you forgot to save sort values as query params
image

Comment on lines 82 to 95
{person.motherName ? (
motherSlug ? (
<a
href={`#/people/${motherSlug}`}
className="has-text-danger"
>
{person.motherName}
</a>
) : (
<span>{person.motherName}</span>
)
) : (
'-'
)}

Choose a reason for hiding this comment

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

Suggested change
{person.motherName ? (
motherSlug ? (
<a
href={`#/people/${motherSlug}`}
className="has-text-danger"
>
{person.motherName}
</a>
) : (
<span>{person.motherName}</span>
)
) : (
'-'
)}
{motherSlug ? (
<a
href={`#/people/${motherSlug}`}
className="has-text-danger"
>
{person.motherName}
</a>
) : (
<span>{person.motherName || '-'}</span>
)}

Comment on lines 23 to 25
const foundPerson = persons.find(person => person.name === name);

return foundPerson ? foundPerson.slug : undefined;

Choose a reason for hiding this comment

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

Suggested change
const foundPerson = persons.find(person => person.name === name);
return foundPerson ? foundPerson.slug : undefined;
return persons.find(person => person.name === name)?.slug;

Comment on lines 104 to 105
{loading && <Loader />}
{!loading && (

Choose a reason for hiding this comment

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

better to simplify it using the ternary operator

Copy link

@anastasiiavorobiova anastasiiavorobiova left a comment

Choose a reason for hiding this comment

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

Great work! A click on the person in the table resets filters. Consider fixing it

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Hi, the comments from the previous review still not fixed, you don't need reset filter after clicking the person

@ogchy
Copy link
Author

ogchy commented Sep 16, 2024

sorry i forget to deploy it

Copy link

@TarasHoliuk TarasHoliuk left a comment

Choose a reason for hiding this comment

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

Previous comments were fixed - everything works, so approved ✔️
Added a few comments just FYI

>
<thead>
<tr>
<th onClick={() => onSort('name')}>Name {getSortIcon('name')}</th>

Choose a reason for hiding this comment

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

Suggested change
<th onClick={() => onSort('name')}>Name {getSortIcon('name')}</th>
<th onClick={() => onSort('name')}>Name{getSortIcon('name')}</th>

That is the reason tests fail

>
<td>
<a
className={person.sex === 'f' ? 'has-text-danger' : ''}

Choose a reason for hiding this comment

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

it's better to use classnames library for conditional classes

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.

5 participants