Skip to content

Commit d5cf9b9

Browse files
committed
fix: block interaction with a task when translator skills do not match
1 parent a0edd66 commit d5cf9b9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/pages/TranslationDetails/TaskStatusDetails/byStatus/Created/CreatedForOther.jsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Tooltip } from 'antd';
33
import Spacer from '~/shared/Spacer';
44
import { useShallowEqualSelector } from '~/adapters/react-redux';
55
import { selectAllSkills } from '~/features/translator/translatorSlice';
6+
import ContentBlocker from '~/shared/ContentBlocker';
67
import TaskStatusDetailsLayout from '../../components/TaskStatusDetailsLayout';
78
import ContextAwareTaskInteractionButton from '../../components/ContextAwareTaskInteractionButton';
89
import TaskDeadline from '../../components/TaskDeadline';
@@ -50,12 +51,10 @@ export default function CreatedForOther() {
5051

5152
return (
5253
<Tooltip title={!hasSkill ? "You don't have the required skills for this task" : ''}>
53-
<div
54-
css={`
55-
opacity: ${!hasSkill ? '0.4' : '1'};
56-
`}
57-
>
58-
<TaskStatusDetailsLayout {...props} />
54+
<div>
55+
<ContentBlocker blocked={!hasSkill} contentBlur={0}>
56+
<TaskStatusDetailsLayout {...props} />
57+
</ContentBlocker>
5958
</div>
6059
</Tooltip>
6160
);

0 commit comments

Comments
 (0)