diff --git a/app/presenters/content_item/no_deal_notice.rb b/app/presenters/content_item/no_deal_notice.rb index be6cd0df7e..c6b5041a72 100644 --- a/app/presenters/content_item/no_deal_notice.rb +++ b/app/presenters/content_item/no_deal_notice.rb @@ -8,19 +8,17 @@ def has_no_deal_notice? end def no_deal_notice_component - # TODO: uncomment this if statement once schema is sorted - #if has_no_deal_notice? + if has_no_deal_notice? { title: no_deal_notice_title, description_govspeak: no_deal_notice_description_govspeak, } - #end end private def no_deal_notice - content_item["no_deal_notice"] + content_item["brexit_no_deal_notice"] end def no_deal_notice_title @@ -43,27 +41,9 @@ def no_deal_notice_description_govspeak content_tag :div do content_tag(:p, no_deal_notice_description) + content_tag(:ul, class: "legislative-list") do - no_deal_links.collect { |link| content_tag(:li, link_to(link[:title], link[:path]), tracking_attributes) }.join("").html_safe + no_deal_notice.collect { |link| content_tag(:li, link_to(link[:title], link[:path]), no_deal_notice_tracking_attributes) }.join("").html_safe end end end - - def no_deal_links - # TODO: get this from the content item, rather than hardcoding - [ - { - title: "This is one link", - path: "/path", - }, - { - title: "This is second link", - path: "/path-2", - }, - { - title: "This is a third link", - path: "/path-3", - }, - ] - end end end