Skip to content

Commit

Permalink
fix: remove tags and limit categories to 3 (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala authored Feb 2, 2024
1 parent 369d16f commit 7f6b640
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ export default withSdk<Props>(({ sdk, entity }) => {
const categoriesProps = getInputProps('categories')
const authorProps = getInputProps('author')
const emailProps = getInputProps('email')
const tagsProps = getInputProps('tags')
const silenceVoiceChatProps = getInputProps('silenceVoiceChat', (e) => e.target.checked)
const disablePortableExperiencesProps = getInputProps('disablePortableExperiences', (e) => e.target.checked)

Expand Down Expand Up @@ -395,10 +394,20 @@ export default withSdk<Props>(({ sdk, entity }) => {
/>
</span>
<Dropdown label="Age Rating" options={AGE_RATING_OPTIONS} {...ageRatingProps} />
<Dropdown label="Categories" options={CATEGORIES_OPTIONS} multiple {...categoriesProps} />
<Dropdown
label="Categories"
options={CATEGORIES_OPTIONS}
multiple
{...categoriesProps}
onChange={(event) => {
if ((event.target.value as unknown as string[]).length > 3) {
return
}
categoriesProps.onChange!(event)
}}
/>
<TextField label="Author (optional)" {...authorProps} />
<TextField label="Email (optional)" {...emailProps} />
<TextField label="Tags (optional)" {...tagsProps} />
</>
) : null}

Expand Down

0 comments on commit 7f6b640

Please sign in to comment.