Skip to content

Conversation

@hexawulf
Copy link
Owner

This commit addresses an error where Select.Item components in the PublicHome page could receive an empty string as a value if a snippet's language or tag data contained an empty string.

The PublicHome.tsx component has been updated to filter out any empty or whitespace-only strings from snippet.language or items in snippet.tags before adding them to the sets of available filter options. This ensures all Select.Item components receive valid, non-empty values, resolving the "A <Select.Item /> must have a value prop that is not an empty string" error.

The ALL_ITEMS_VALUE constant (_ALL_) for the "All Languages" / "All Tags" options remains in place and functions as intended.

This commit addresses an error where `Select.Item` components in the
PublicHome page could receive an empty string as a value if a snippet's
language or tag data contained an empty string.

The `PublicHome.tsx` component has been updated to filter out any empty
or whitespace-only strings from `snippet.language` or items in
`snippet.tags` before adding them to the sets of available filter options.
This ensures all `Select.Item` components receive valid, non-empty values,
resolving the "A <Select.Item /> must have a value prop that is not an
empty string" error.

The `ALL_ITEMS_VALUE` constant (`_ALL_`) for the "All Languages" / "All Tags"
options remains in place and functions as intended.
@hexawulf hexawulf merged commit 3e66d91 into main May 26, 2025
2 of 3 checks passed
@hexawulf hexawulf deleted the public-view-system branch May 26, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants