Skip to content

Commit

Permalink
Remove AU nav redirects
Browse files Browse the repository at this point in the history
scalafmt
  • Loading branch information
arelra committed May 3, 2024
1 parent 460e6e2 commit 3253403
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
23 changes: 15 additions & 8 deletions common/app/navigation/NavLinks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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))
Expand All @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -307,10 +314,10 @@ object NavLinks {
climateCrisis,
indigenousAustralia,
auImmigration,
media,
auMedia,
auBusiness,
science,
tech,
auTech,
podcastsAU,
newsletters,
),
Expand Down Expand Up @@ -467,10 +474,10 @@ object NavLinks {
)
val auCulturePillar = ukCulturePillar.copy(
children = List(
film,
auFilm,
music,
books,
tvAndRadio,
auTvAndRadio,
artAndDesign,
stage,
games,
Expand Down
14 changes: 7 additions & 7 deletions common/test/resources/reference-navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,7 @@
},
{
"title": "Environment",
"url": "/uk/environment",
"url": "/au/environment",
"children": [
{
"title": "Climate crisis",
Expand Down Expand Up @@ -1857,13 +1857,13 @@
},
{
"title": "Media",
"url": "/media",
"url": "/au/media",
"children": [],
"classList": []
},
{
"title": "Business",
"url": "/uk/business",
"url": "au/business",
"children": [
{
"title": "Markets",
Expand Down Expand Up @@ -1931,7 +1931,7 @@
},
{
"title": "Tech",
"url": "/technology",
"url": "/au/technology",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -2103,7 +2103,7 @@
"children": [
{
"title": "Film",
"url": "/film",
"url": "/au/film",
"children": [],
"classList": []
},
Expand All @@ -2121,7 +2121,7 @@
},
{
"title": "TV & radio",
"url": "/tv-and-radio",
"url": "/us/tv-and-radio",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -2160,7 +2160,7 @@
"children": [
{
"title": "Travel",
"url": "/uk/travel",
"url": "/au/travel",
"children": [
{
"title": "Australasia",
Expand Down

0 comments on commit 3253403

Please sign in to comment.