From a1452ac5034a20af62daf2ef90f3f2203458386d Mon Sep 17 00:00:00 2001 From: Rebecca McGinn <59573468+rebeccamcginn@users.noreply.github.com> Date: Wed, 16 Nov 2022 12:17:43 +0000 Subject: [PATCH] Remove temporary topic path (#10411) * Remove temporary topic path * snapshot update Co-authored-by: Aaron Moore --- src/app/routes/topic/index.js | 4 ++-- src/app/routes/utils/regex/index.js | 2 -- .../utils/regex/utils/__snapshots__/index.test.js.snap | 2 -- src/app/routes/utils/regex/utils/index.js | 5 ----- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/app/routes/topic/index.js b/src/app/routes/topic/index.js index 4edaacef643..38ecad893a4 100644 --- a/src/app/routes/topic/index.js +++ b/src/app/routes/topic/index.js @@ -1,10 +1,10 @@ import { TopicPage } from '#pages'; -import { temporaryTopicPath, topicPath } from '#app/routes/utils/regex'; +import { topicPath } from '#app/routes/utils/regex'; import { TOPIC_PAGE } from '#app/routes/utils/pageTypes'; import getInitialData from './getInitialData'; export default { - path: [temporaryTopicPath, topicPath], + path: topicPath, exact: true, component: TopicPage, getInitialData, diff --git a/src/app/routes/utils/regex/index.js b/src/app/routes/utils/regex/index.js index 25c9c2d7317..eca5eca7fb8 100644 --- a/src/app/routes/utils/regex/index.js +++ b/src/app/routes/utils/regex/index.js @@ -12,7 +12,6 @@ import { getPodcastBrandRegex, getOnDemandRadioRegex, getOnDemandTvRegex, - getTemporaryTopicPageRegex, getTopicPageRegex, getErrorPageRegex, getLegacyAssetRegex, @@ -58,7 +57,6 @@ export const podcastBrandDataPath = `${podcastBrandPath}.json`; export const onDemandTvPath = getOnDemandTvRegex(allServices); export const onDemandTvDataPath = `${onDemandTvPath}.json`; -export const temporaryTopicPath = getTemporaryTopicPageRegex(allServices); export const topicPath = getTopicPageRegex(allServices); export const topicDataPath = `${topicPath}.json`; diff --git a/src/app/routes/utils/regex/utils/__snapshots__/index.test.js.snap b/src/app/routes/utils/regex/utils/__snapshots__/index.test.js.snap index 222d2da15cd..6b258767260 100644 --- a/src/app/routes/utils/regex/utils/__snapshots__/index.test.js.snap +++ b/src/app/routes/utils/regex/utils/__snapshots__/index.test.js.snap @@ -44,6 +44,4 @@ exports[`regex utils snapshots should create expected regex from getSecondaryCol exports[`regex utils snapshots should create expected regex from getSwRegex 1`] = `"/:service(news|persian|igbo)/sw.js"`; -exports[`regex utils snapshots should create expected regex from getTemporaryTopicPageRegex 1`] = `"/:service(news|persian|igbo):variant(/simp|/trad|/cyr|/lat)?/new_topics/:id([a-z0-9]+)?"`; - exports[`regex utils snapshots should create expected regex from getTopicPageRegex 1`] = `"/:service(news|persian|igbo):variant(/simp|/trad|/cyr|/lat)?/topics/:id([a-z0-9]+)?"`; diff --git a/src/app/routes/utils/regex/utils/index.js b/src/app/routes/utils/regex/utils/index.js index 738df29358f..3a134429d2a 100644 --- a/src/app/routes/utils/regex/utils/index.js +++ b/src/app/routes/utils/regex/utils/index.js @@ -79,11 +79,6 @@ export const getOnDemandTvRegex = services => { return `/:service(${serviceRegex})/:serviceId(${tvMasterBrandRegex})/:brandEpisode(${brandEpisodeRegex})/:mediaId(${mediaIdRegex}):amp(${ampRegex})?`; }; -export const getTemporaryTopicPageRegex = services => { - const serviceRegex = getServiceRegex(services); - return `/:service(${serviceRegex}):variant(${variantRegex})?/new_topics/:id(${topicIdRegex})?`; -}; - export const getTopicPageRegex = services => { const serviceRegex = getServiceRegex(services); return `/:service(${serviceRegex}):variant(${variantRegex})?/topics/:id(${topicIdRegex})?`;