Fix color scheme logic in TaskPage component to ensure consistent button styling based on task accessibility. Simplified the color scheme condition for better readability and maintainability.
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -169,7 +169,7 @@ export const TaskPage = () => {
|
||||
key={t.id}
|
||||
size="sm"
|
||||
variant={isCurrent ? 'solid' : isAccessible ? 'outline' : 'ghost'}
|
||||
colorScheme={isCurrent ? 'teal' : isAccessible ? 'gray' : 'gray'}
|
||||
colorScheme={isCurrent ? 'teal' : 'gray'}
|
||||
// @ts-expect-error Chakra UI v2 uses isDisabled
|
||||
isDisabled={!isAccessible}
|
||||
onClick={() => isAccessible && handleNavigateToTask(t.id)}
|
||||
|
||||
Reference in New Issue
Block a user