Skip to content

Commit

Permalink
Remove temporary topic path (#10411)
Browse files Browse the repository at this point in the history
* Remove temporary topic path

* snapshot update

Co-authored-by: Aaron Moore <[email protected]>
  • Loading branch information
rebeccamcginn and amoore108 authored Nov 16, 2022
1 parent b14887a commit a1452ac
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/app/routes/topic/index.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/app/routes/utils/regex/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
getPodcastBrandRegex,
getOnDemandRadioRegex,
getOnDemandTvRegex,
getTemporaryTopicPageRegex,
getTopicPageRegex,
getErrorPageRegex,
getLegacyAssetRegex,
Expand Down Expand Up @@ -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`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]+)?"`;
5 changes: 0 additions & 5 deletions src/app/routes/utils/regex/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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})?`;
Expand Down

0 comments on commit a1452ac

Please sign in to comment.