Skip to content

Commit

Permalink
dont render link/button if there's no dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3rw3rk committed Sep 23, 2024
1 parent 5cc1104 commit 791fd8e
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/elm/Pages/Dashboards.elm
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,25 @@ viewDashboards dashboards =
|> Route.Path.href
in
div [ class "item", Util.testAttribute "dashboard-item" ]
[ span [ class "dashboard-item-title" ]
[ a [ dashboardLink ] [ text dashboard.dashboard.name ]
, code [] [ text dashboard.dashboard.id ]
(if String.contains "(not found)" dashboard.dashboard.name then
[ span [ class "dashboard-item-title" ]
[ text dashboard.dashboard.name
, code [] [ text dashboard.dashboard.id ]
]
, viewDashboardRepos dashboard
]
, div [ class "buttons" ]
[ a [ class "button", dashboardLink ] [ text "View" ]

else
[ span [ class "dashboard-item-title" ]
[ a [ dashboardLink ] [ text dashboard.dashboard.name ]
, code [] [ text dashboard.dashboard.id ]
]
, div [ class "buttons" ]
[ a [ class "button", dashboardLink ] [ text "View" ]
]
, viewDashboardRepos dashboard
]
, viewDashboardRepos dashboard
]
)
)


Expand Down

0 comments on commit 791fd8e

Please sign in to comment.