2 Commits

Author SHA1 Message Date
23ec02e29a 1.4.1
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit
2025-12-14 16:05:18 +03:00
1291519cda Refactor TaskWorkspace to use getFeatureValue for feature flag retrieval, improving clarity and consistency in skip button functionality.
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit
2025-12-14 16:05:05 +03:00
3 changed files with 5 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "challenge", "name": "challenge",
"version": "1.4.0", "version": "1.4.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "challenge", "name": "challenge",
"version": "1.4.0", "version": "1.4.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@brojs/cli": "^1.9.4", "@brojs/cli": "^1.9.4",

View File

@@ -1,6 +1,6 @@
{ {
"name": "challenge", "name": "challenge",
"version": "1.4.0", "version": "1.4.1",
"description": "", "description": "",
"main": "./src/index.tsx", "main": "./src/index.tsx",
"scripts": { "scripts": {

View File

@@ -9,7 +9,7 @@ import {
} from '@chakra-ui/react' } from '@chakra-ui/react'
import ReactMarkdown from 'react-markdown' import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm' import remarkGfm from 'remark-gfm'
import { useFeature } from '@brojs/cli' import { getFeatureValue } from '@brojs/cli'
import type { ChallengeTask } from '../../__data__/types' import type { ChallengeTask } from '../../__data__/types'
import { useChallenge } from '../../context/ChallengeContext' import { useChallenge } from '../../context/ChallengeContext'
@@ -29,7 +29,7 @@ export const TaskWorkspace = ({ task, onTaskComplete, onTaskSkip }: TaskWorkspac
}) })
// Проверяем, включена ли кнопка пропуска через feature flag // Проверяем, включена ли кнопка пропуска через feature flag
const skipEnabled = useFeature('challenge', 'task.skip.enabled', 'false') === 'true' const skipEnabled = getFeatureValue('challenge', 'task.skip.enabled', 'false').value === 'true'
// Сохраняем последний результат, чтобы блок не исчезал // Сохраняем последний результат, чтобы блок не исчезал
const [lastResult, setLastResult] = useState<typeof finalSubmission>(null) const [lastResult, setLastResult] = useState<typeof finalSubmission>(null)