Skip to content

Commit

Permalink
feat(lists): handle empty search list (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
balzdur authored Jun 7, 2024
1 parent 6c79367 commit 13dbe39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/app-builder/public/locales/en/lists.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"show_less": "show less",
"empty_custom_lists_list": "You do not have any list. Add your first one to see it here.",
"empty_custom_list_values_list": "This list is empty. Add its first value to see it here.",
"empty_custom_list_matches": "No value matches your search.",
"create_list.title": "New List",
"create_list.name_placeholder": "Add a name to your list",
"create_list.description_placeholder": "Add a description",
Expand Down
4 changes: 3 additions & 1 deletion packages/app-builder/src/routes/_builder+/lists+/$listId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export default function Lists() {
{virtualTable.isEmpty ? (
<div className="bg-grey-00 border-grey-10 flex h-28 max-w-3xl flex-col items-center justify-center rounded-lg border border-solid p-4">
<p className="text-s font-medium">
{t('lists:empty_custom_list_values_list')}
{listValues.length > 0
? t('lists:empty_custom_list_matches')
: t('lists:empty_custom_list_values_list')}
</p>
</div>
) : (
Expand Down

0 comments on commit 13dbe39

Please sign in to comment.