Skip to content

Commit

Permalink
Add Instagram URL to Partner view
Browse files Browse the repository at this point in the history
  • Loading branch information
James Walker committed Dec 15, 2024
1 parent 7d9ca8a commit 464a096
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Theme/Page/Partner.elm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ viewInfo localModel { partner, events } =
, section [ css [ contactWrapperStyle ] ]
[ div [ css [ contactSectionStyle ] ]
[ h3 [ css [ contactHeadingStyle, Theme.Global.smallInlineTitleStyle ] ] [ text (t PartnerContactsHeading) ]
, viewContactDetails partner.maybeUrl partner.maybeContactDetails
, viewContactDetails partner.maybeUrl partner.maybeContactDetails partner.maybeInstagramUrl
]
, div [ css [ contactSectionStyle ] ]
[ h3 [ css [ contactHeadingStyle, Theme.Global.smallInlineTitleStyle ] ] [ text (t PartnerAddressHeading) ]
Expand Down Expand Up @@ -110,9 +110,9 @@ viewPartnerEvents events localModel partner =
)


viewContactDetails : Maybe String -> Maybe Data.PlaceCal.Partners.Contact -> Html msg
viewContactDetails maybeUrl maybeContactDetails =
if maybeUrl == Nothing && maybeContactDetails == Nothing then
viewContactDetails : Maybe String -> Maybe Data.PlaceCal.Partners.Contact -> Maybe String -> Html msg
viewContactDetails maybeUrl maybeContactDetails maybeInstagramUrl =
if maybeUrl == Nothing && maybeContactDetails == Nothing && maybeInstagramUrl == Nothing then
p [ css [ contactItemStyle ] ] [ text (t PartnerContactsEmptyText) ]

else
Expand Down Expand Up @@ -146,6 +146,12 @@ viewContactDetails maybeUrl maybeContactDetails =
Just url ->
p [ css [ contactItemStyle ] ] [ a [ href url, target "_blank", css [ linkStyle ] ] [ text (Copy.Text.urlToDisplay url) ] ]

Nothing ->
text ""
, case maybeInstagramUrl of
Just url ->
p [ css [ contactItemStyle ] ] [ a [ href url, target "_blank", css [ linkStyle ] ] [ text (Copy.Text.urlToDisplay url) ] ]

Nothing ->
text ""
]
Expand Down

0 comments on commit 464a096

Please sign in to comment.