-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
base: master
Are you sure you want to change the base?
Develop #1058
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/PeopleTable/PeopleTable.tsx
Outdated
{person.motherName ? ( | ||
motherSlug ? ( | ||
<a | ||
href={`#/people/${motherSlug}`} | ||
className="has-text-danger" | ||
> | ||
{person.motherName} | ||
</a> | ||
) : ( | ||
<span>{person.motherName}</span> | ||
) | ||
) : ( | ||
'-' | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{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> | |
)} |
src/PeopleTable/PeopleTable.tsx
Outdated
const foundPerson = persons.find(person => person.name === name); | ||
|
||
return foundPerson ? foundPerson.slug : undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const foundPerson = persons.find(person => person.name === name); | |
return foundPerson ? foundPerson.slug : undefined; | |
return persons.find(person => person.name === name)?.slug; |
src/PeoplePage/PeoplePage.tsx
Outdated
{loading && <Loader />} | ||
{!loading && ( |
There was a problem hiding this comment.
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
There was a problem hiding this 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
There was a problem hiding this 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
sorry i forget to deploy it |
There was a problem hiding this 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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<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' : ''} |
There was a problem hiding this comment.
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
https://ogchy.github.io/react_people-table-advanced/