Skip to content

Commit

Permalink
Remove UK nav redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
arelra committed May 3, 2024
1 parent 24aa374 commit 460e6e2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
23 changes: 13 additions & 10 deletions common/app/navigation/NavLinks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ object NavLinks {
/* NEWS */
val science = NavLink("Science", "/science")
val tech = NavLink("Tech", "/technology")
val ukTech = NavLink("Tech", "/uk/technology")
val usTech = NavLink("Tech", "/us/technology")
val politics = NavLink("UK politics", "/politics")
val media = NavLink("Media", "/media")
Expand Down Expand Up @@ -76,29 +77,29 @@ object NavLinks {
longTitle = Some("World news"),
children = List(europe, usNews, americas, asia, australiaNews, middleEast, africa, inequality, globalDevelopment),
)

val ukEnvironment =
NavLink("Environment", "/environment", children = List(climateCrisis, wildlife, energy, pollution))
NavLink("Environment", "/uk/environment", children = List(climateCrisis, wildlife, energy, pollution))
val auEnvironment = ukEnvironment.copy(children =
List(climateCrisis, energy, wildlife, biodiversity, oceans, pollution, greatBarrierReef),
)

val usEnvironment =
NavLink("Environment", "/us/environment", children = List(climateCrisis, wildlife, energy, pollution, greenLight))

val money = NavLink("Money", "/money", children = List(property, pensions, savings, borrowing, careers))
val ukMoney = NavLink("Money", "/uk/money", children = List(property, pensions, savings, borrowing, careers))
val usMoney = NavLink("Money", "/us/money", children = List(property, pensions, savings, borrowing, careers))

val ukBusiness = NavLink(
"Business",
"/business",
"/uk/business",
children = List(economics, banking, money, markets, projectSyndicate, businessToBusiness, retail),
)

val usBusiness = NavLink(
"Business",
"/us/business",
children = List(economics, diversityEquality, smallBusiness, retail),
)

val auBusiness = ukBusiness.copy(children = List(markets, money, projectSyndicate, retail))

/* OPINION */
Expand Down Expand Up @@ -165,8 +166,10 @@ object NavLinks {

/* CULTURE */
val film = NavLink("Film", "/film")
val ukFilm = NavLink("Film", "/uk/film")
val usFilm = NavLink("Film", "/us/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 music = NavLink("Music", "/music")
val games = NavLink("Games", "/games")
Expand Down Expand Up @@ -196,7 +199,7 @@ object NavLinks {
val travelUs = NavLink("US", "/travel/usa")
val travelAustralasia = NavLink("Australasia", "/travel/australasia")
val travelAsia = NavLink("Asia", "/travel/asia")
val ukTravel = NavLink("Travel", "/travel", children = List(travelUk, travelEurope, travelUs))
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 usWellness = NavLink("Wellness", "/us/wellness")
Expand Down Expand Up @@ -290,7 +293,7 @@ object NavLinks {
education,
society,
science,
tech,
ukTech,
globalDevelopment,
obituaries,
),
Expand Down Expand Up @@ -452,9 +455,9 @@ object NavLinks {
longTitle = Some("Culture home"),
iconName = Some("home"),
List(
film,
ukFilm,
music,
tvAndRadio,
ukTvAndRadio,
books,
artAndDesign,
stage,
Expand Down Expand Up @@ -516,7 +519,7 @@ object NavLinks {
loveAndSex,
beauty,
home,
money,
ukMoney,
cars,
),
)
Expand Down
32 changes: 16 additions & 16 deletions common/test/resources/reference-navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
},
{
"title": "Business",
"url": "/business",
"url": "/uk/business",
"children": [
{
"title": "Economics",
Expand Down Expand Up @@ -300,7 +300,7 @@
},
{
"title": "Environment",
"url": "/environment",
"url": "/uk/environment",
"children": [
{
"title": "Climate crisis",
Expand Down Expand Up @@ -380,7 +380,7 @@
},
{
"title": "Tech",
"url": "/technology",
"url": "/uk/technology",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -564,7 +564,7 @@
"children": [
{
"title": "Film",
"url": "/film",
"url": "/uk/film",
"children": [],
"classList": []
},
Expand All @@ -576,7 +576,7 @@
},
{
"title": "TV & radio",
"url": "/tv-and-radio",
"url": "/uk/tv-and-radio",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -639,7 +639,7 @@
},
{
"title": "Travel",
"url": "/travel",
"url": "/uk/travel",
"children": [
{
"title": "UK",
Expand Down Expand Up @@ -700,7 +700,7 @@
},
{
"title": "Money",
"url": "/money",
"url": "/uk/money",
"children": [
{
"title": "Property",
Expand Down Expand Up @@ -1790,7 +1790,7 @@
},
{
"title": "Environment",
"url": "/environment",
"url": "/uk/environment",
"children": [
{
"title": "Climate crisis",
Expand Down Expand Up @@ -1863,7 +1863,7 @@
},
{
"title": "Business",
"url": "/business",
"url": "/uk/business",
"children": [
{
"title": "Markets",
Expand Down Expand Up @@ -2160,7 +2160,7 @@
"children": [
{
"title": "Travel",
"url": "/travel",
"url": "/uk/travel",
"children": [
{
"title": "Australasia",
Expand Down Expand Up @@ -2568,7 +2568,7 @@
},
{
"title": "Environment",
"url": "/environment",
"url": "/uk/environment",
"children": [
{
"title": "Climate crisis",
Expand Down Expand Up @@ -2666,7 +2666,7 @@
},
{
"title": "Business",
"url": "/business",
"url": "/uk/business",
"children": [
{
"title": "Economics",
Expand Down Expand Up @@ -3011,7 +3011,7 @@
},
{
"title": "Travel",
"url": "/travel",
"url": "/uk/travel",
"children": [
{
"title": "UK",
Expand Down Expand Up @@ -3560,7 +3560,7 @@
},
{
"title": "Environment",
"url": "/environment",
"url": "/uk/environment",
"children": [
{
"title": "Climate crisis",
Expand Down Expand Up @@ -3658,7 +3658,7 @@
},
{
"title": "Business",
"url": "/business",
"url": "/uk/business",
"children": [
{
"title": "Economics",
Expand Down Expand Up @@ -4003,7 +4003,7 @@
},
{
"title": "Travel",
"url": "/travel",
"url": "/uk/travel",
"children": [
{
"title": "UK",
Expand Down

0 comments on commit 460e6e2

Please sign in to comment.