From 32534036393a6ced303d4553477708eea4a2ebf3 Mon Sep 17 00:00:00 2001 From: Ravi <7014230+arelra@users.noreply.github.com> Date: Fri, 3 May 2024 17:30:04 +0100 Subject: [PATCH] Remove AU nav redirects scalafmt --- common/app/navigation/NavLinks.scala | 23 ++++++++++++------- .../test/resources/reference-navigation.json | 14 +++++------ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/common/app/navigation/NavLinks.scala b/common/app/navigation/NavLinks.scala index c7cf6452971..29b638c71e5 100644 --- a/common/app/navigation/NavLinks.scala +++ b/common/app/navigation/NavLinks.scala @@ -11,8 +11,10 @@ object NavLinks { val tech = NavLink("Tech", "/technology") val ukTech = NavLink("Tech", "/uk/technology") val usTech = NavLink("Tech", "/us/technology") + val auTech = NavLink("Tech", "/au/technology") val politics = NavLink("UK politics", "/politics") val media = NavLink("Media", "/media") + val auMedia = NavLink("Media", "/au/media") val globalDevelopment = NavLink("Global development", "/global-development") val australiaNews = NavLink("Australia", "/australia-news", longTitle = Some("Australia news")) val auPolitics = NavLink("AU politics", "/australia-news/australian-politics", longTitle = Some("Politics")) @@ -80,8 +82,10 @@ object NavLinks { val ukEnvironment = NavLink("Environment", "/uk/environment", children = List(climateCrisis, wildlife, energy, pollution)) - val auEnvironment = ukEnvironment.copy(children = - List(climateCrisis, energy, wildlife, biodiversity, oceans, pollution, greatBarrierReef), + val auEnvironment = NavLink( + "Environment", + "/au/environment", + children = List(climateCrisis, energy, wildlife, biodiversity, oceans, pollution, greatBarrierReef), ) val usEnvironment = NavLink("Environment", "/us/environment", children = List(climateCrisis, wildlife, energy, pollution, greenLight)) @@ -100,7 +104,7 @@ object NavLinks { "/us/business", children = List(economics, diversityEquality, smallBusiness, retail), ) - val auBusiness = ukBusiness.copy(children = List(markets, money, projectSyndicate, retail)) + val auBusiness = NavLink("Business", "au/business", children = List(markets, money, projectSyndicate, retail)) /* OPINION */ val columnists = NavLink("Columnists", "/index/contributors") @@ -168,9 +172,11 @@ object NavLinks { val film = NavLink("Film", "/film") val ukFilm = NavLink("Film", "/uk/film") val usFilm = NavLink("Film", "/us/film") + val auFilm = NavLink("Film", "/au/film") val tvAndRadio = NavLink("TV & radio", "/tv-and-radio") val ukTvAndRadio = NavLink("TV & radio", "/uk/tv-and-radio") val usTvAndRadio = NavLink("TV & radio", "/us/tv-and-radio") + val auTvAndRadio = NavLink("TV & radio", "/us/tv-and-radio") val music = NavLink("Music", "/music") val games = NavLink("Games", "/games") val books = NavLink("Books", "/books") @@ -201,7 +207,8 @@ object NavLinks { val travelAsia = NavLink("Asia", "/travel/asia") val ukTravel = NavLink("Travel", "/uk/travel", children = List(travelUk, travelEurope, travelUs)) val usTravel = NavLink("Travel", "/us/travel", children = List(travelUs, travelEurope, travelUk)) - val auTravel = ukTravel.copy(children = List(travelAustralasia, travelAsia, travelUk, travelEurope, travelUs)) + val auTravel = + NavLink("Travel", "/au/travel", children = List(travelAustralasia, travelAsia, travelUk, travelEurope, travelUs)) val usWellness = NavLink("Wellness", "/us/wellness") val todaysPaper = NavLink( @@ -307,10 +314,10 @@ object NavLinks { climateCrisis, indigenousAustralia, auImmigration, - media, + auMedia, auBusiness, science, - tech, + auTech, podcastsAU, newsletters, ), @@ -467,10 +474,10 @@ object NavLinks { ) val auCulturePillar = ukCulturePillar.copy( children = List( - film, + auFilm, music, books, - tvAndRadio, + auTvAndRadio, artAndDesign, stage, games, diff --git a/common/test/resources/reference-navigation.json b/common/test/resources/reference-navigation.json index 82e520e387c..d56c9b1c809 100644 --- a/common/test/resources/reference-navigation.json +++ b/common/test/resources/reference-navigation.json @@ -1790,7 +1790,7 @@ }, { "title": "Environment", - "url": "/uk/environment", + "url": "/au/environment", "children": [ { "title": "Climate crisis", @@ -1857,13 +1857,13 @@ }, { "title": "Media", - "url": "/media", + "url": "/au/media", "children": [], "classList": [] }, { "title": "Business", - "url": "/uk/business", + "url": "au/business", "children": [ { "title": "Markets", @@ -1931,7 +1931,7 @@ }, { "title": "Tech", - "url": "/technology", + "url": "/au/technology", "children": [], "classList": [] }, @@ -2103,7 +2103,7 @@ "children": [ { "title": "Film", - "url": "/film", + "url": "/au/film", "children": [], "classList": [] }, @@ -2121,7 +2121,7 @@ }, { "title": "TV & radio", - "url": "/tv-and-radio", + "url": "/us/tv-and-radio", "children": [], "classList": [] }, @@ -2160,7 +2160,7 @@ "children": [ { "title": "Travel", - "url": "/uk/travel", + "url": "/au/travel", "children": [ { "title": "Australasia",