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

[Task]: Update SearchPagination to include data length check #1921

Closed
rylew1 opened this issue May 3, 2024 · 0 comments · Fixed by #1922
Closed

[Task]: Update SearchPagination to include data length check #1921

rylew1 opened this issue May 3, 2024 · 0 comments · Fixed by #1922
Assignees
Labels
project: grants.gov Grants.gov Modernization tickets

Comments

@rylew1
Copy link
Contributor

rylew1 commented May 3, 2024

Summary

in SearchForm - we have the following:

  {searchResults?.data?.length >= 1 ? (
                <SearchPagination
                  totalPages={searchResults?.pagination_info?.total_pages}
                  page={page}
                  handlePageChange={handlePageChange}
                />
              ) : null}

{searchResults?.data?.length >= 1 check would be better placed inside the SearchPagination component.

Acceptance criteria

  • SearchForm doesn't have any conditionals in jsx
@rylew1 rylew1 added the project: grants.gov Grants.gov Modernization tickets label May 3, 2024
@rylew1 rylew1 added this to the Search UI - Enhancements and fast follow milestone May 5, 2024
@rylew1 rylew1 self-assigned this May 6, 2024
rylew1 added a commit that referenced this issue May 7, 2024
… component (#1922)

## Summary
Fixes #1921 

## Changes proposed
- Move search results length check into `SearchPagination` component so
there are no conditionals in `SearchForm`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project: grants.gov Grants.gov Modernization tickets
Projects
1 participant