From 216603458252f1c1574c0237fe0cdc9c67188eb8 Mon Sep 17 00:00:00 2001 From: Karina Thomas Date: Fri, 17 Jan 2025 11:53:28 +0000 Subject: [PATCH 1/4] Do not fetch radio schedule data client side, as this is now done on the server --- .../__snapshots__/index.test.jsx.snap | 1453 +---------------- .../RadioSchedule/Canonical/index.jsx | 55 +- .../RadioSchedule/Canonical/index.test.jsx | 105 +- .../legacy/containers/RadioSchedule/index.jsx | 22 +- .../RadioSchedule/index.stories.jsx | 59 - .../getRadioSchedulesUrls/index.jsx | 16 - .../getRadioSchedulesUrls/index.test.jsx | 74 - 7 files changed, 12 insertions(+), 1772 deletions(-) delete mode 100644 src/app/legacy/containers/RadioSchedule/index.stories.jsx delete mode 100644 src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.jsx delete mode 100644 src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.test.jsx diff --git a/src/app/legacy/containers/RadioSchedule/Canonical/__snapshots__/index.test.jsx.snap b/src/app/legacy/containers/RadioSchedule/Canonical/__snapshots__/index.test.jsx.snap index ed3aba7b57f..4f21c53afa6 100644 --- a/src/app/legacy/containers/RadioSchedule/Canonical/__snapshots__/index.test.jsx.snap +++ b/src/app/legacy/containers/RadioSchedule/Canonical/__snapshots__/index.test.jsx.snap @@ -1,1457 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Canonical RadioSchedule With initial data renders correctly for a service 1`] = ` -.emotion-0 { - background-color: #F2F2F2; - padding: 0 1rem; - content-visibility: auto; - contain-intrinsic-size: 59.375rem; -} - -@media (min-width: 15rem) { - .emotion-0 { - contain-intrinsic-size: 56.563rem; - } -} - -@media (min-width: 25rem) { - .emotion-0 { - contain-intrinsic-size: 51.063rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-0 { - contain-intrinsic-size: 30.75rem; - } -} - -@media (min-width: 63rem) { - .emotion-0 { - contain-intrinsic-size: 21.25rem; - } -} - -.emotion-3 { - position: relative; - z-index: 0; - color: #141414; - margin-top: 2rem; - margin: 0 auto; - width: 100%; - padding-top: 0.5rem; -} - -@media (min-width: 37.5rem) { - .emotion-3 { - margin-top: 1.5rem; - } -} - -@media (min-width: 63rem) { - .emotion-3 { - margin-bottom: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-3 { - margin: 0 auto; - padding-top: 1.5rem; - } -} - -@media (min-width: 63rem) { - .emotion-3 { - max-width: 63rem; - padding-top: 2rem; - } -} - -.emotion-5 { - margin: 0; - padding: 0; - scroll-margin-top: 1rem; -} - -.emotion-5:focus-visible { - outline: 0.1875rem solid #000000; - box-shadow: 0 0 0 0.1875rem #FFFFFF; - outline-offset: 0.1875rem; -} - -.emotion-7 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; -} - -.emotion-9 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-flex-flow: row nowrap; - -webkit-flex-flow: row nowrap; - -ms-flex-flow: row nowrap; - flex-flow: row nowrap; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - justify-content: space-between; - min-height: 2.75rem; - -webkit-align-items: baseline; - -webkit-box-align: baseline; - -ms-flex-align: baseline; - align-items: baseline; -} - -@media (min-width: 37.5rem) { - .emotion-9 { - -webkit-align-items: stretch; - -webkit-box-align: stretch; - -ms-flex-align: stretch; - align-items: stretch; - } -} - -.emotion-11 { - font-size: 1.25rem; - line-height: 1.75rem; - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - background-color: #F2F2F2; - margin: 1rem 0; - padding-left: 0.5rem; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-11 { - font-size: 1.25rem; - line-height: 1.75rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-11 { - font-size: 1.5rem; - line-height: 2rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-11 { - margin: 0; - } -} - -@media (min-width: 37.5rem) { - .emotion-11 { - padding-left: 1rem; - } -} - -.emotion-13 { - margin: 0 auto; - width: 100%; - padding-bottom: 1rem; -} - -@media (min-width: 37.5rem) { - .emotion-13 { - margin-top: 1.5rem; - } -} - -@media (min-width: 63rem) { - .emotion-13 { - max-width: 63rem; - padding-bottom: 1.5rem; - } -} - -.emotion-16 { - padding: 0; - margin: 0; -} - -@media (max-width: 14.9375rem) { - .emotion-16 { - padding: 0 0.5rem; - } -} - -@media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-16 { - padding: 0 0.5rem; - } -} - -@media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-16 { - padding: 0 1rem; - } -} - -@supports (display: grid) { - .emotion-16 { - display: grid; - position: initial; - width: initial; - margin: 0; - } - - @media (max-width: 14.9375rem) { - .emotion-16 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - grid-column-gap: 0.5rem; - padding: 0 0.5rem; - } - } - - @media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-16 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - grid-column-gap: 0.5rem; - padding: 0 0.5rem; - } - } - - @media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-16 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - grid-column-gap: 0.5rem; - padding: 0 1rem; - } - } - - @media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-16 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - grid-column-gap: 1rem; - } - } - - @media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-16 { - grid-template-columns: repeat(8, 1fr); - grid-column-end: span 8; - grid-column-gap: 1rem; - } - } - - @media (min-width: 80rem) { - .emotion-16 { - grid-template-columns: repeat(8, 1fr); - grid-column-end: span 8; - grid-column-gap: 1rem; - } - } -} - -@media (max-width: 37.5rem) { - .emotion-16 { - padding: 0; - } -} - -.emotion-19 { - position: relative; - padding-bottom: 1rem; -} - -@media (max-width: 14.9375rem) { - .emotion-19 { - width: calc(4/4*(100% - 4 * 0.5rem) + 3 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-19 { - width: calc(4/4*(100% - 4 * 0.5rem) + 3 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-19 { - width: calc(6/6*(100% - 6 * 0.5rem) + 5 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-19 { - width: calc(3/6*(100% - 6 * 1rem) + 2 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-19 { - width: calc(2/8*(100% - 8 * 1rem) + 1 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 80rem) { - .emotion-19 { - width: calc(2/8*(100% - 8 * 1rem) + 1 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@supports (display: grid) { - .emotion-19 { - display: block; - width: initial; - margin: 0; - } - - @media (max-width: 14.9375rem) { - .emotion-19 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - } - } - - @media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-19 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - } - } - - @media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-19 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - } - } - - @media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-19 { - grid-template-columns: repeat(3, 1fr); - grid-column-end: span 3; - } - } - - @media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-19 { - grid-template-columns: repeat(2, 1fr); - grid-column-end: span 2; - } - } - - @media (min-width: 80rem) { - .emotion-19 { - grid-template-columns: repeat(2, 1fr); - grid-column-end: span 2; - } - } -} - -@supports (grid-template-columns: fit-content(200px)) { - .emotion-19 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - } -} - -.emotion-21 { - padding-bottom: 0.5rem; -} - -.emotion-23 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-25 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding-left: 0.25rem; -} - -.emotion-25>svg { - color: #5A5A5A; - margin: 0; - overflow: visible; -} - -@media screen and (forced-colors: active) { - .emotion-25>svg { - fill: canvasText; - } -} - -.emotion-27 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.725rem; - height: 0.725rem; -} - -.emotion-29 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - width: 100%; -} - -.emotion-29>time { - color: #5A5A5A; - font-size: 0.75rem; - line-height: 1.125rem; - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-29>time { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-29>time { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -.emotion-29::after { - content: ''; - border-top: 0.0625rem solid #AEAEB5; - top: 1.0625rem; - margin-right: 0.625rem; - width: 100%; -} - -.emotion-31 { - font-size: 0.875rem; - line-height: 1.25rem; - color: #545658; - display: block; - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-31 { - font-size: 0.875rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-31 { - font-size: 0.8125rem; - line-height: 1.25rem; - } -} - -.emotion-33 { - padding-top: 0.5rem; - background-color: #FFFFFF; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -} - -.emotion-35 { - padding: 0 0.5rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - -.emotion-37 { - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; - color: #6E6E73; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-37 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-37 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-39 { - -webkit-clip-path: inset(100%); - clip-path: inset(100%); - clip: rect(1px, 1px, 1px, 1px); - height: 1px; - overflow: hidden; - position: absolute; - width: 1px; - margin: 0; -} - -.emotion-40 { - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; - color: #B80000; - display: inline-block; - margin-left: 0.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-40 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-40 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-43 { - color: #6E6E73; - padding: 0.5rem 0 0 0; - display: inline-block; - width: 100%; - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-43 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-43 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-46 { - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.875rem; - line-height: 1.25rem; - color: #6E6E73; - padding-top: 0.5rem; - padding-bottom: 1rem; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-46 { - font-size: 0.875rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-46 { - font-size: 0.8125rem; - line-height: 1.25rem; - } -} - -.emotion-48 { - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1.125rem; - padding: 0.5rem; - background-color: #FFFFFF; - outline: 0.0625rem solid transparent; - color: #B80000; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-48 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-48 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-48 { - background-color: transparent; - outline: none; - } -} - -.emotion-50>svg { - color: #B80000; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -@media screen and (forced-colors: active) { - .emotion-50>svg { - fill: canvasText; - } -} - -.emotion-52 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.75rem; - height: 0.75rem; -} - -.emotion-54 { - padding-right: 0.5rem; -} - -.emotion-75 { - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; - color: #222222; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-75 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-75 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-77 { - position: static; - color: #222222; - -webkit-text-decoration: none; - text-decoration: none; - overflow-wrap: break-word; - display: inline-block; -} - -.emotion-77:before { - bottom: 0; - content: ''; - left: 0; - overflow: hidden; - position: absolute; - right: 0; - top: 0; - white-space: nowrap; - z-index: 1; -} - -.emotion-77:hover, -.emotion-77:focus { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-77:visited { - color: #6E6E73; -} - -.emotion-77:hover .emotion-44 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-77:focus .emotion-44 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-81 { - color: #3F3F42; - padding: 0.5rem 0 0 0; - display: inline-block; - width: 100%; - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-81 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-81 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-86 { - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1.125rem; - padding: 0.5rem; - background-color: #222222; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-86 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-86 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-86 { - background-color: transparent; - outline: none; - } -} - -.emotion-88>svg { - color: #FFFFFF; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -@media screen and (forced-colors: active) { - .emotion-88>svg { - fill: canvasText; - } -} - -.emotion-170 { - font-size: 0.9375rem; - line-height: 1.375rem; - font-family: "BBC Reith Qalam","Times New Roman",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - color: #222222; - -webkit-text-decoration: none; - text-decoration: none; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-170 { - font-size: 0.9375rem; - line-height: 1.375rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-170 { - font-size: 0.875rem; - line-height: 1.375rem; - } -} - -.emotion-170:hover, -.emotion-170:focus { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-170:visited { - color: #6E6E73; -} - -
-
-
-

- - - - البث الإذاعي - - - -

-
-
-
-
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - واصل الاستماع, - - - العالم هذا الصباح - - , 09:00, - - - 1 يناير/ كانون الثاني 2030 - - - , المدة 1،30،30 - - -

    -

    - الفترة الإخبارية الرئيسية كل صباح على مدى أربع ساعات وتتناول أهم الأخبار والموضوعات الأقليمية والدولية بالتغطية والتحليل. -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - استمع, - - العالم هذا الصباح - - , 02:59, - - - 26 مارس/ آذار 2020 - - - , المدة 2،00،00 - - - -

    -

    - الفترة الإخبارية الرئيسية كل صباح على مدى أربع ساعات وتتناول أهم الأخبار والموضوعات الأقليمية والدولية بالتغطية والتحليل. -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - استمع, - - موجز الأنباء - - , 02:30, - - - 26 مارس/ آذار 2020 - - - , المدة 02،00 - - - -

    -

    - نشرة موجزة في دقيقتين لأهم الأنباء الأقليمية والدولية -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - استمع, - - نشرة الأخبار - - , 02:00, - - - 26 مارس/ آذار 2020 - - - , المدة 06،00 - - - -

    -

    - نشرة اخبارية على رأس الساعة تركز على أهم أخبار المنطقة والعالم وتتضمن تصريحات المسؤولين وإفادات مراسلينا -

    -
    -
    - - - - -
    -
    -
  • -
    - - استقبال البث - -
    -
    -
    -`; - -exports[`Canonical RadioSchedule Without initial data renders correctly for a service with a radio schedule and page frequency URL 1`] = ` +exports[`RadioSchedule With initial data renders correctly for a service 1`] = ` .emotion-0 { background-color: #F2F2F2; padding: 0 1rem; diff --git a/src/app/legacy/containers/RadioSchedule/Canonical/index.jsx b/src/app/legacy/containers/RadioSchedule/Canonical/index.jsx index d76f7353bad..f0e753f4e85 100644 --- a/src/app/legacy/containers/RadioSchedule/Canonical/index.jsx +++ b/src/app/legacy/containers/RadioSchedule/Canonical/index.jsx @@ -1,7 +1,6 @@ -import React, { useEffect, useState, useContext } from 'react'; +import React, { useContext } from 'react'; import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; -import moment from 'moment'; import { GEL_GROUP_1_SCREEN_WIDTH_MIN, GEL_GROUP_2_SCREEN_WIDTH_MIN, @@ -18,14 +17,8 @@ import { import { getLongPrimer } from '#psammead/gel-foundations/src/typography'; import { getSansRegular } from '#psammead/psammead-styles/src/font-styles'; import SectionLabel from '#psammead/psammead-section-label/src'; -import { RequestContext } from '#contexts/RequestContext'; import RadioSchedule from '#components/RadioSchedule'; -import webLogger from '#lib/logger.web'; -import { RADIO_SCHEDULE_FETCH_ERROR } from '#lib/logger.const'; import { ServiceContext } from '../../../../contexts/ServiceContext'; -import processRadioSchedule from '../utilities/processRadioSchedule'; - -const logger = webLogger(); const RadioScheduleSection = styled.section` background-color: ${props => props.theme.palette.LUNAR}; @@ -94,8 +87,7 @@ const RadioFrequencyLink = styled.a` `; const CanonicalRadioSchedule = ({ - initialData, - endpoint, + radioSchedule, lang = null, className = '', }) => { @@ -106,10 +98,6 @@ const CanonicalRadioSchedule = ({ radioSchedule: radioScheduleConfig = {}, } = useContext(ServiceContext); - const { timeOnServer } = useContext(RequestContext); - - const [radioSchedule, setRadioSchedule] = useState(initialData); - const { header, frequenciesPageUrl, frequenciesPageLabel, durationLabel } = radioScheduleConfig; @@ -117,45 +105,6 @@ const CanonicalRadioSchedule = ({ palette: { LUNAR }, } = useTheme(); - useEffect(() => { - if (!radioSchedule) { - const handleResponse = url => async response => { - if (!response.ok) { - throw Error( - `Unexpected response (HTTP status code ${response.status}) when requesting ${url}`, - ); - } - - const radioScheduleData = await response.json(); - const timeOnClient = parseInt(moment.utc().format('x'), 10); - const processedSchedule = processRadioSchedule( - radioScheduleData, - service, - timeOnServer || timeOnClient, - ); - setRadioSchedule(processedSchedule); - }; - - const fetchRadioScheduleData = pathname => - fetch(pathname, { mode: 'no-cors' }) - .then(handleResponse(pathname)) - .catch(error => { - logger.error( - JSON.stringify( - { - event: RADIO_SCHEDULE_FETCH_ERROR, - message: error.toString(), - }, - null, - 2, - ), - ); - }); - - fetchRadioScheduleData(endpoint); - } - }, [endpoint, service, timeOnServer, radioSchedule]); - if (!radioSchedule) { return null; } diff --git a/src/app/legacy/containers/RadioSchedule/Canonical/index.test.jsx b/src/app/legacy/containers/RadioSchedule/Canonical/index.test.jsx index f675b7e5a58..c05567a6443 100644 --- a/src/app/legacy/containers/RadioSchedule/Canonical/index.test.jsx +++ b/src/app/legacy/containers/RadioSchedule/Canonical/index.test.jsx @@ -7,12 +7,10 @@ import { act, } from '../../../../components/react-testing-library-with-providers'; import { ServiceContextProvider } from '../../../../contexts/ServiceContext'; -import CanonicalRadioSchedule from '.'; +import RadioSchedule from '.'; import processRadioSchedule from '../utilities/processRadioSchedule'; -const endpoint = 'https://localhost/arabic/bbc_arabic_radio/schedule.json'; - -const RadioScheduleWithContext = ({ initialData, lang }) => ( +const RadioScheduleWithContext = ({ radioSchedule, lang }) => ( ( timeOnServer={Date.now()} > - + ); -describe('Canonical RadioSchedule', () => { +describe('RadioSchedule', () => { beforeEach(() => { fetch.resetMocks(); }); @@ -49,7 +43,7 @@ describe('Canonical RadioSchedule', () => { let container; await act(async () => { container = render( - , + , ).container; }); expect(container).toMatchSnapshot(); @@ -65,7 +59,7 @@ describe('Canonical RadioSchedule', () => { await act(async () => { container = render( - , + , ).container; }); expect(container.querySelectorAll('li').length).toEqual(4); @@ -111,91 +105,4 @@ describe('Canonical RadioSchedule', () => { expect(container).toBeEmptyDOMElement(); }); }); - - describe('Without initial data', () => { - it('renders correctly for a service with a radio schedule and page frequency URL', async () => { - fetch.mockResponseOnce(JSON.stringify(arabicRadioScheduleData)); - let container; - - await act(async () => { - container = render().container; - }); - - expect(container).toMatchSnapshot(); - }); - - it('contains four programs for a service with a radio schedule', async () => { - fetch.mockResponseOnce(JSON.stringify(arabicRadioScheduleData)); - let container; - - await act(async () => { - container = render().container; - }); - expect(container.querySelectorAll('li').length).toEqual(4); - }); - - it('render radio schedules container with lang code', async () => { - fetch.mockResponseOnce(JSON.stringify(arabicRadioScheduleData)); - let container; - - await act(async () => { - container = render().container; - }); - expect(container.querySelector('section')).toHaveAttribute( - 'lang', - 'fa-AF', - ); - }); - - it('does not render when data contains less than 4 programs', async () => { - const radioSchedule2Programmes = { ...arabicRadioScheduleData }; - radioSchedule2Programmes.schedules = - radioSchedule2Programmes.schedules.slice(0, 2); - - fetch.mockResponseOnce(JSON.stringify(radioSchedule2Programmes)); - - let container; - - await act(async () => { - container = render().container; - }); - expect(container).toBeEmptyDOMElement(); - }); - - it('does not render when data contains no programs', async () => { - fetch.mockResponseOnce( - JSON.stringify({ - schedules: [], - }), - ); - let container; - - await act(async () => { - container = render().container; - }); - expect(container).toBeEmptyDOMElement(); - }); - - it('does not render when data fetched returns non-ok status code', async () => { - global.console.error = jest.fn(); - fetch.mockResponse({ status: 404 }); - let container; - - await act(async () => { - container = render().container; - }); - expect(container).toBeEmptyDOMElement(); - }); - - it('does not render when data fetch is rejected', async () => { - global.console.error = jest.fn(); - fetch.mockRejectOnce(Error('Server not found')); - let container; - - await act(async () => { - container = render().container; - }); - expect(container).toBeEmptyDOMElement(); - }); - }); }); diff --git a/src/app/legacy/containers/RadioSchedule/index.jsx b/src/app/legacy/containers/RadioSchedule/index.jsx index aff1d6020e2..53647697469 100644 --- a/src/app/legacy/containers/RadioSchedule/index.jsx +++ b/src/app/legacy/containers/RadioSchedule/index.jsx @@ -1,44 +1,28 @@ import React, { useContext } from 'react'; import pathOr from 'ramda/src/pathOr'; import { RequestContext } from '#contexts/RequestContext'; -import useLocation from '#hooks/useLocation'; import useToggle from '#hooks/useToggle'; -import { getRadioScheduleEndpoint } from '#lib/utilities/getUrlHelpers/getRadioSchedulesUrls'; import { ServiceContext } from '../../../contexts/ServiceContext'; import Canonical from './Canonical'; const RadioSchedule = ({ initialData, - radioScheduleEndpointOverride = null, lang = null, className = '', toggleName, }) => { const { enabled } = useToggle(toggleName); - const { isAmp, env } = useContext(RequestContext); - const { service, radioSchedule } = useContext(ServiceContext); - const location = useLocation(); + const { isAmp } = useContext(RequestContext); + const { radioSchedule } = useContext(ServiceContext); const hasRadioSchedule = pathOr(null, ['hasRadioSchedule'], radioSchedule); const radioScheduleEnabled = !isAmp && enabled && hasRadioSchedule; if (!radioScheduleEnabled) { return null; } - const endpoint = - radioScheduleEndpointOverride || - getRadioScheduleEndpoint({ - service, - env, - queryString: location.search, - }); return ( - + ); }; diff --git a/src/app/legacy/containers/RadioSchedule/index.stories.jsx b/src/app/legacy/containers/RadioSchedule/index.stories.jsx deleted file mode 100644 index a45d110ac19..00000000000 --- a/src/app/legacy/containers/RadioSchedule/index.stories.jsx +++ /dev/null @@ -1,59 +0,0 @@ -import React from 'react'; -import { BrowserRouter } from 'react-router-dom'; -import moment from 'moment'; -import { RequestContextProvider } from '#contexts/RequestContext'; -import { ToggleContextProvider } from '#contexts/ToggleContext'; -import { getLocalRadioScheduleEndpoint } from '#lib/utilities/getUrlHelpers/getRadioSchedulesUrls'; -import { FRONT_PAGE } from '#app/routes/utils/pageTypes'; -import RadioScheduleContainer from '.'; - -// Currently, only these services have radio schedule data -const radioServices = { - afaanoromoo: 'oromo', - afrique: 'afrique', - amharic: 'amharic', - arabic: 'arabic', - bengali: 'bangla', - burmese: 'burmese', - gahuza: 'gahuza', - hausa: 'hausa', - indonesia: 'indonesian', - korean: 'korean', - pashto: 'pashto', - persian: 'dari', - somali: 'somali', - swahili: 'swahili', - tigrinya: 'tigrinya', - urdu: 'urdu', -}; - -const Component = (_, { service }) => ( - - - - - - - -); - -moment.locale('en-GB'); // needed for Time Machine date string - -export default { - title: 'Containers/Radio Schedule', - Component, - parameters: { chromatic: { disable: true } }, -}; - -export const RadioSchedule = Component; diff --git a/src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.jsx b/src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.jsx deleted file mode 100644 index e72999aba40..00000000000 --- a/src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.jsx +++ /dev/null @@ -1,16 +0,0 @@ -export const getRadioScheduleEndpoint = ({ - service, - radioService = service, - env, - queryString, - baseUrl = '', -}) => { - const query = env !== 'live' && queryString ? queryString : ''; - - return `${baseUrl}/${service}/bbc_${radioService}_radio/schedule.json${query}`; -}; - -export const getLocalRadioScheduleEndpoint = ({ - service, - radioService = service, -}) => `./data/${service}/bbc_${radioService}_radio/schedule.json`; diff --git a/src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.test.jsx b/src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.test.jsx deleted file mode 100644 index cfdbee1dc52..00000000000 --- a/src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.test.jsx +++ /dev/null @@ -1,74 +0,0 @@ -import { getRadioScheduleEndpoint, getLocalRadioScheduleEndpoint } from '.'; - -describe('getRadioScheduleEndpoint', () => { - it('should return endpoint when passed service', () => { - expect(getRadioScheduleEndpoint({ service: 'hausa' })).toBe( - '/hausa/bbc_hausa_radio/schedule.json', - ); - }); - it('should return endpoint when passed base URL and service', () => { - expect( - getRadioScheduleEndpoint({ service: 'hausa', baseUrl: 'bbc.com' }), - ).toBe('bbc.com/hausa/bbc_hausa_radio/schedule.json'); - }); - it('should return endpoint when passed service & radioService', () => { - expect( - getRadioScheduleEndpoint({ service: 'persian', radioService: 'dari' }), - ).toBe('/persian/bbc_dari_radio/schedule.json'); - }); - describe('query param override', () => { - it('should always return endpoint without query string on live', () => { - expect( - getRadioScheduleEndpoint({ - service: 'hausa', - queryString: '?renderer_env=live', - env: 'live', - }), - ).toBe('/hausa/bbc_hausa_radio/schedule.json'); - }); - it('should return endpoint with query string on test', () => { - expect( - getRadioScheduleEndpoint({ - service: 'hausa', - queryString: '?renderer_env=live', - env: 'test', - }), - ).toBe('/hausa/bbc_hausa_radio/schedule.json?renderer_env=live'); - }); - it('should return endpoint with query string on local', () => { - expect( - getRadioScheduleEndpoint({ - service: 'hausa', - queryString: '?renderer_env=live', - env: 'local', - }), - ).toBe('/hausa/bbc_hausa_radio/schedule.json?renderer_env=live'); - }); - it('should return with query string when passed service & radioService', () => { - expect( - getRadioScheduleEndpoint({ - service: 'persian', - radioService: 'dari', - queryString: '?renderer_env=live', - env: 'test', - }), - ).toBe('/persian/bbc_dari_radio/schedule.json?renderer_env=live'); - }); - }); -}); - -describe('getLocalRadioScheduleEndpoint', () => { - it('should return endpoint when passed service', () => { - expect(getLocalRadioScheduleEndpoint({ service: 'hausa' })).toBe( - './data/hausa/bbc_hausa_radio/schedule.json', - ); - }); - it('should return endpoint when passed service & radioService', () => { - expect( - getLocalRadioScheduleEndpoint({ - service: 'persian', - radioService: 'dari', - }), - ).toBe('./data/persian/bbc_dari_radio/schedule.json'); - }); -}); From 6d035b976670d5365e4b12a5381f4c2071fa511e Mon Sep 17 00:00:00 2001 From: Karina Thomas Date: Fri, 17 Jan 2025 11:54:57 +0000 Subject: [PATCH 2/4] Remove withRadioSchedule as it is no longer required --- .../routes/frontPage/getInitialData/index.js | 11 +- .../routes/utils/withRadioSchedule/index.js | 65 ---------- .../utils/withRadioSchedule/index.test.js | 117 ------------------ 3 files changed, 1 insertion(+), 192 deletions(-) delete mode 100644 src/app/routes/utils/withRadioSchedule/index.js delete mode 100644 src/app/routes/utils/withRadioSchedule/index.test.js diff --git a/src/app/routes/frontPage/getInitialData/index.js b/src/app/routes/frontPage/getInitialData/index.js index fe0fa38587d..81fab7a9cd6 100644 --- a/src/app/routes/frontPage/getInitialData/index.js +++ b/src/app/routes/frontPage/getInitialData/index.js @@ -1,6 +1,5 @@ import pipe from 'ramda/src/pipe'; import path from 'ramda/src/path'; -import withRadioSchedule from '#app/routes/utils/withRadioSchedule'; import filterUnknownContentTypes from '#app/routes/utils/sharedDataTransformers/filterUnknownContentTypes'; import filterEmptyGroupItems from '#app/routes/utils/sharedDataTransformers/filterEmptyGroupItems'; import squashTopStories from '#app/routes/utils/sharedDataTransformers/squashTopStories'; @@ -23,7 +22,6 @@ const transformJson = pipe( filterGroupsWithoutStraplines, ); -const getRadioScheduleToggle = path(['frontPageRadioSchedule', 'enabled']); const getRadioSchedulePosition = path(['frontPageRadioSchedule', 'value']); export default async ({ @@ -42,16 +40,9 @@ export default async ({ getAgent, }); - const radioScheduleIsEnabled = getRadioScheduleToggle(toggles); const radioSchedulePosition = getRadioSchedulePosition(toggles); - const { json, status } = radioScheduleIsEnabled - ? await withRadioSchedule({ - pageDataPromise, - service, - path: pathname, - }) - : await pageDataPromise; + const { json, status } = await pageDataPromise; if (!json?.data?.article) { throw handleError('Front page data is malformed', 500); diff --git a/src/app/routes/utils/withRadioSchedule/index.js b/src/app/routes/utils/withRadioSchedule/index.js deleted file mode 100644 index eb67cb9bc48..00000000000 --- a/src/app/routes/utils/withRadioSchedule/index.js +++ /dev/null @@ -1,65 +0,0 @@ -import nodeLogger from '#lib/logger.node'; -import { getRadioScheduleEndpoint } from '#lib/utilities/getUrlHelpers/getRadioSchedulesUrls'; -import { getQueryString } from '#lib/utilities/urlParser'; -import processRadioSchedule from '#containers/RadioSchedule/utilities/processRadioSchedule'; -import { RADIO_SCHEDULE_FETCH_ERROR } from '#lib/logger.const'; -import { getEnvConfig } from '#app/lib/utilities/getEnvConfig'; - -const logger = nodeLogger(__filename); - -const fetchData = url => { - const handleResponse = async response => { - const { status } = response; - - if (!response.ok) { - throw Error( - `Unexpected upstream response (HTTP status code ${status}) when requesting ${url}`, - ); - } - - return response.json(); - }; - - const handleError = e => { - const error = e && e.toString(); - logger.error(RADIO_SCHEDULE_FETCH_ERROR, { error }); - }; - - return fetch(url).then(handleResponse).catch(handleError); -}; - -const withRadioSchedule = async ({ - pageDataPromise, - service, - path, - radioService, -}) => { - const { SIMORGH_APP_ENV, SIMORGH_BASE_URL } = getEnvConfig(); - - const radioScheduleUrl = getRadioScheduleEndpoint({ - service, - radioService, - env: SIMORGH_APP_ENV, - queryString: getQueryString(path), - baseUrl: SIMORGH_BASE_URL, - }); - const radioSchedulePromise = fetchData(radioScheduleUrl); - - const [{ json: pageData, ...rest }, radioScheduleJson] = await Promise.all([ - pageDataPromise, - radioSchedulePromise, - ]); - - const radioScheduleData = processRadioSchedule( - radioScheduleJson, - service, - Date.now(), - ); - - return { - ...rest, - ...(pageData && { json: { ...pageData, radioScheduleData } }), - }; -}; - -export default withRadioSchedule; diff --git a/src/app/routes/utils/withRadioSchedule/index.test.js b/src/app/routes/utils/withRadioSchedule/index.test.js deleted file mode 100644 index bc78ec1959c..00000000000 --- a/src/app/routes/utils/withRadioSchedule/index.test.js +++ /dev/null @@ -1,117 +0,0 @@ -import loggerMock from '#testHelpers/loggerMock'; -import { RADIO_SCHEDULE_FETCH_ERROR } from '#lib/logger.const'; -import radioScheduleJson from '#data/hausa/bbc_hausa_radio/schedule.json'; -import withRadioSchedule from '.'; - -const pageDataPromise = Promise.resolve({ - json: { foo: 'bar' }, - status: 200, -}); - -const service = 'hausa'; -const path = 'http://localhost/mock-frontpage-path'; - -describe('withRadioSchedule', () => { - beforeEach(() => { - process.env.SIMORGH_BASE_URL = 'http://localhost'; - }); - - afterEach(() => { - jest.resetAllMocks(); - fetch.resetMocks(); - }); - - describe('page data and radio schedule promises resolve with data', () => { - it('should merge radio schedule data into page data', async () => { - fetch.mockResponse(JSON.stringify(radioScheduleJson)); - - const { - json: { radioScheduleData, foo }, - ...rest - } = await withRadioSchedule({ - pageDataPromise, - service, - path, - }); - - expect(radioScheduleData.length).toBeTruthy(); - expect(foo).toBe('bar'); - expect(rest.status).toBe(200); - }); - }); - - describe('if either page data or radio schedule fetch returns non-ok status code', () => { - it('should not merge radio schedule data into page data if radio schedule fetch returns non-ok status code', async () => { - fetch.mockResponse(JSON.stringify({ status: 404 })); - - const { - json: { radioScheduleData, foo }, - ...rest - } = await withRadioSchedule({ pageDataPromise, service, path }); - - expect(radioScheduleData).toBeUndefined(); - expect(foo).toBe('bar'); - expect(rest.status).toBe(200); - }); - - it('should not merge radio schedule data into page data if page data fetch returns non-ok status code', async () => { - fetch.mockResponse(JSON.stringify(radioScheduleJson)); - - const failedPageDataPromise = Promise.resolve({ - status: 404, - }); - - const { json, status } = await withRadioSchedule({ - pageDataPromise: failedPageDataPromise, - service, - path, - }); - - expect(json).toBeUndefined(); - expect(status).toBe(404); - }); - - it('should not merge radio schedule data into page data if both page data and radio schedule return non-ok status code', async () => { - fetch.mockResponse(JSON.stringify({ status: 404 })); - - const failedPageDataPromise = Promise.resolve({ - status: 404, - }); - - const { json, status } = await withRadioSchedule({ - pageDataPromise: failedPageDataPromise, - service, - path, - }); - - expect(json).toBeUndefined(); - expect(status).toBe(404); - }); - - describe('fetch API promises rejected', () => { - it('should return page data without radio schedules if radio schedule fetch promise is rejected', async () => { - fetch.mockReject(Error('Server not found')); - - const { - json: { radioScheduleData, foo }, - ...rest - } = await withRadioSchedule({ - pageDataPromise, - service, - path, - }); - - expect(radioScheduleData).toBeNull(); - expect(foo).toBe('bar'); - expect(rest.status).toBe(200); - - expect(loggerMock.error).toHaveBeenCalledWith( - RADIO_SCHEDULE_FETCH_ERROR, - { - error: 'Error: Server not found', - }, - ); - }); - }); - }); -}); From 63928c68b700f0bede178fab3d292a04c4d62b37 Mon Sep 17 00:00:00 2001 From: Karina Thomas Date: Fri, 17 Jan 2025 12:00:41 +0000 Subject: [PATCH 3/4] Fix test --- .../frontPage/getInitialData/index.test.js | 86 ------------------- 1 file changed, 86 deletions(-) diff --git a/src/app/routes/frontPage/getInitialData/index.test.js b/src/app/routes/frontPage/getInitialData/index.test.js index e420254d22d..e7f896ac4e5 100644 --- a/src/app/routes/frontPage/getInitialData/index.test.js +++ b/src/app/routes/frontPage/getInitialData/index.test.js @@ -1,5 +1,4 @@ import frontPageJsonSerbian from '#data/serbian/frontpage/lat.json'; -import radioScheduleJson from '#data/hausa/bbc_hausa_radio/schedule.json'; import { CPS_ASSET as pageType } from '#app/routes/utils/pageTypes'; import * as fetchPageData from '#app/routes/utils/fetchPageData'; import { BFF_FETCH_ERROR } from '#app/lib/logger.const'; @@ -166,89 +165,4 @@ describe('Front Page - Get Initial Data', () => { status: 500, }); }); - - describe('with Radio Schedule', () => { - // Set all radio scheduled dates to the future - radioScheduleJson.schedules[2].publishedTimeStart = Date.now() - 100000; - - it('should return data for a page without radio schedule', async () => { - const { pageData } = await getInitialData({ - path: '/serbian/lat', - service: 'serbian', - variant: 'lat', - pageType, - getAgent: mockGetAgent, - }); - - expect(pageData.metadata.language).toEqual('sr-Latn'); - expect(pageData.metadata.summary).toEqual( - 'BBC na srpskom nudi ekskluzivan sadržaj - analitičko, istraživačko i nepristrasno izveštavanje u tekstovima i video prilozima prilagođenim i društvenim mrežama.', - ); - expect(pageData.promo.name).toEqual('Početna strana'); - expect(pageData.content.groups.length).toBeTruthy(); - - expect(pageData.radioScheduleData).toBeUndefined(); - }); - - it('should return data to render a front page with radio schedules', async () => { - fetch.mockResponseOnce(JSON.stringify(frontPageJsonSerbian)); - fetch.mockResponseOnce(JSON.stringify(radioScheduleJson)); - - const { pageData } = await getInitialData({ - path: '/serbian/lat', - service: 'serbian', - variant: 'lat', - pageType, - toggles: { - frontPageRadioSchedule: { - enabled: true, - value: 'Features', - }, - }, - getAgent: mockGetAgent, - }); - - expect(pageData.content.groups.length).toBeTruthy(); - expect(pageData.radioScheduleData.length).toBe(4); - }); - - it('should return data for service with radio schedules, but toggle is disabled', async () => { - const { pageData } = await getInitialData({ - path: '/serbian/lat', - service: 'serbian', - variant: 'lat', - pageType, - toggles: { - frontPageRadioSchedule: { - enabled: false, - }, - }, - getAgent: mockGetAgent, - }); - - expect(pageData.content.groups.length).toBeTruthy(); - expect(pageData.radioScheduleData).toBeUndefined(); - }); - - it('should return page data for misconfigured service without radio schedules, but with radio schedules on front page', async () => { - fetch.mockResponseOnce(JSON.stringify(frontPageJsonSerbian)); - fetch.mockResponseOnce(null); - - const { pageData } = await getInitialData({ - path: '/serbian/lat', - service: 'serbian', - variant: 'lat', - pageType, - toggles: { - frontPageRadioSchedule: { - enabled: true, - }, - }, - getAgent: mockGetAgent, - }); - - expect(pageData.content.groups.length).toBeTruthy(); - expect(pageData.radioScheduleData).toBeNull(); - }); - }); }); From b445e6e74779a796de1a2deb256d46cd14dc2c50 Mon Sep 17 00:00:00 2001 From: Karina Thomas Date: Fri, 17 Jan 2025 12:12:29 +0000 Subject: [PATCH 4/4] Remove references to getRadioSchedulesUrls as it has been deleted --- src/app/lib/utilities/getUrlHelpers/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/lib/utilities/getUrlHelpers/index.js b/src/app/lib/utilities/getUrlHelpers/index.js index 065068bd831..16e633eb5aa 100644 --- a/src/app/lib/utilities/getUrlHelpers/index.js +++ b/src/app/lib/utilities/getUrlHelpers/index.js @@ -1,9 +1,7 @@ import getMostReadUrls from './getMostReadUrls'; -import getRadioSchedulesUrls from './getRadioSchedulesUrls'; import getSecondaryColumnUrl from './getSecondaryColumnUrl'; export default { getMostReadUrls, - getRadioSchedulesUrls, getSecondaryColumnUrl, };