Skip to content

Commit

Permalink
FIX Delete should be gray when Experiment = Live & Completed
Browse files Browse the repository at this point in the history
  • Loading branch information
Meefish committed Jan 10, 2025
1 parent 3bfecf0 commit a535ba3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pages/Experiment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,18 @@ const Experiment: React.FC = () => {
/>
</button>

{/* Delete Experiment (red if not completed, else gray) */}
{/* Delete Experiment (red if not live, else gray) */}
<button
className={`experiment-button ${
status === 'Completed' ? 'gray-button' : 'red-button'
status === 'Live' || status === 'Completed' ? 'gray-button' : 'red-button'
}`}
title={
status === 'Completed'
? 'An experiment can only be deleted before being live'
status === 'Live' || status === 'Completed'
? 'An experiment cannot be deleted while it is live or completed'
: ''
}
onClick={status === 'Completed' ? undefined : handleDeleteExperiment}
disabled={status === 'Completed'}
onClick={status === 'Live' || status === 'Completed' ? undefined : handleDeleteExperiment}
disabled={status === 'Live' || status === 'Completed'}
>
<span>Delete Experiment</span>
<img
Expand Down

0 comments on commit a535ba3

Please sign in to comment.