fix(journeys-admin): hide Load More button when no more images to load [NES-1692]#9245
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit b530ccc
☁️ Nx Cloud last updated this comment at |
|
The latest updates on your projects.
|
Summary
In the media library, the "Load More" button used to stay visible after the last page and switch its label to "No more to load". That's confusing — feedback from Lyuba. Now the button is simply hidden when there are no more images to load.
Changes
LoadMoreButtonreturnsnullwhen!hasMore && !loading(loading still shows the loading state).LoadMoreButton.spec.tsxandMediaLibrary.spec.tsxto assert the hidden state.Linear
Test plan
npx jest --config apps/journeys-admin/jest.config.ts --no-coverageonLoadMoreButton.spec.tsxandMediaLibrary.spec.tsx— 20 passed