We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ab7c19 commit 75b2aa5Copy full SHA for 75b2aa5
src/components/editor/OperationEditor.tsx
@@ -196,10 +196,18 @@ const DifficultyPicker: FC<{
196
197
const stageName = useWatch({ control, name: 'stageName' })
198
const { data: levels } = useLevels()
199
- const invalid = useMemo(
200
- () => !hasHardMode(levels, stageName),
201
- [levels, stageName],
202
- )
+ const invalid = useMemo(() => {
+ // if the stageName is a custom level, we always allow setting difficulty
+ if (!findLevelByStageName(levels, stageName)) {
+ return false
203
+ }
204
+
205
+ if (hasHardMode(levels, stageName)) {
206
207
208
209
+ return true
210
+ }, [levels, stageName])
211
212
useEffect(() => {
213
if (invalid && value !== OpDifficulty.UNKNOWN) {
0 commit comments