feat: add "on this page" to empty table message when you're past page 1 #4886
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a saved url takes a user to a page beyond the number of records they have, they see an empty table. The message in the empty table should point out that they might not have no records at all; they just don't have any on this page. So I added an empty-page treatment to the currently paginated pages: workspaces, users, and audit log. I ended up going with this solution over a redirect because I don't think a redirect is always the best behavior, and it was hard to single out just the on-mount cases (since I don't know we have no results until after the fetch).
I added stories for each as well, and in order to do that I needed to prop-drill because the query-params storybook add-on doesn't work for some reason.
While I was in there I switched to
ChooseOne
, making it a little clearer that each page has a 3-way choice, and switched fromLanguage
to i18n.