Skip to content

Commit

Permalink
Merge pull request #3389 from input-output-hk/merivale/oracle-related…
Browse files Browse the repository at this point in the history
…-improvements

Adding explanatory text if a step has no possible actions.
  • Loading branch information
hrajchert committed Jun 17, 2021
2 parents 5881bef + 0dd0c35 commit fb3e072
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions marlowe-dashboard-client/src/Contract/View.purs
Expand Up @@ -9,7 +9,7 @@ import Contract.State (currentStep, isContractClosed)
import Contract.Types (Action(..), PreviousStep, PreviousStepState(..), State, Tab(..), scrollContainerRef)
import Css (applyWhen, classNames, toggleWhen)
import Css as Css
import Data.Array (foldr, intercalate)
import Data.Array (foldr, intercalate, length)
import Data.Array as Array
import Data.Array.NonEmpty (NonEmptyArray)
import Data.Array.NonEmpty as NonEmptyArray
Expand Down Expand Up @@ -500,7 +500,10 @@ renderTasks state =
(Map.keys $ state ^. _participants)
actions
in
div [ classNames [ "pb-4" ] ] $ expandedActions <#> uncurry (renderPartyTasks state)
if length expandedActions > 0 then
div [ classNames [ "pb-4" ] ] $ expandedActions <#> uncurry (renderPartyTasks state)
else
div [ classNames [ "my-4" ] ] [ text "There are no tasks to perform at this step. The contract will progress automatically when the timeout has passed." ]

participantWithNickname :: State -> Party -> String
participantWithNickname state party =
Expand Down

0 comments on commit fb3e072

Please sign in to comment.