Skip to content

Commit

Permalink
fix: Only list available categories in edit template (#9628)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch committed Apr 11, 2024
1 parent a4f10d1 commit fba3b80
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {useFragment} from 'react-relay'
import {ActivityDetailsCategoryBadge_template$key} from '~/__generated__/ActivityDetailsCategoryBadge_template.graphql'
import PlainButton from '../../PlainButton/PlainButton'
import ActivityDetailsBadge from './ActivityDetailsBadge'
import {CATEGORY_ID_TO_NAME, CATEGORY_THEMES, CategoryID} from '../Categories'
import {CATEGORY_ID_TO_NAME, CATEGORY_THEMES, CategoryID, MAIN_CATEGORIES} from '../Categories'
import useTemplateCategoryMutation from '../../../mutations/UpdateTemplateCategoryMutation'

interface Props {
Expand Down Expand Up @@ -49,7 +49,7 @@ const ActivityDetailsCategoryBadge = (props: Props) => {
<DropdownMenu.Portal>
<DropdownMenu.Content className='border-rad rounded bg-white shadow-lg' sideOffset={5}>
<DropdownMenu.RadioGroup value={category} onValueChange={updateTemplateCategory}>
{Object.keys(CATEGORY_THEMES).map((c) => {
{MAIN_CATEGORIES.map((c) => {
const categoryId = c as CategoryID
return (
<DropdownMenu.RadioItem
Expand Down

0 comments on commit fba3b80

Please sign in to comment.