Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1014 from GSA/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
scottqueen-bixal authored Jan 18, 2024
2 parents a866ad9 + 86e0947 commit 8ead885
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
32 changes: 31 additions & 1 deletion middleware/middleware.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
/* eslint-disable sonarjs/cognitive-complexity */
// nuxt i18n is not handling our rootRedirect with a prefix - so we force a redirect here
export default function (ctx) {
if (ctx.route.fullPath === "/es" || ctx.route.fullPath === "/es/") ctx.redirect(301, "/es/death-of-a-loved-one")
// https://benefits-tool.usa.gov https://usa.gov/benefit-finder
if (ctx.route.fullPath === "/" || ctx.route.fullPath === "") ctx.redirect(301, "https://www.usa.gov/benefit-finder")

// https://benefits-tool.usa.gov/es https://usa.gov/es/buscador-beneficios
if (ctx.route.fullPath === "/es" || ctx.route.fullPath === "/es/")
ctx.redirect(301, "https://www.usa.gov/es/buscador-beneficios")

// https://benefits-tool.usa.gov/death-of-a-loved-one https://usa.gov/benefit-finder/death
if (ctx.route.fullPath === "/death-of-a-loved-one" || ctx.route.fullPath === "/death-of-a-loved-one/")
ctx.redirect(301, "https://www.usa.gov/benefit-finder/death")

// https://benefits-tool.usa.gov/es/death-of-a-loved-one https://usa.gov/es/buscador-beneficios/muerte
if (ctx.route.fullPath === "/es/death-of-a-loved-one" || ctx.route.fullPath === "/es/death-of-a-loved-one/")
ctx.redirect(301, "https://www.usa.gov/es/buscador-beneficios/muerte")

// https://benefits-tool.usa.gov/disability https://usa.gov/benefit-finder/disability
if (ctx.route.fullPath === "/disability" || ctx.route.fullPath === "/disability/")
ctx.redirect(301, "https://usa.gov/benefit-finder/disability")

// https://benefits-tool.usa.gov/es/disability https://usa.gov/es/buscador-beneficios/discapacidad
if (ctx.route.fullPath === "/es/disability" || ctx.route.fullPath === "/es/disability/")
ctx.redirect(301, "https://usa.gov/es/buscador-beneficios/discapacidad")

// https://benefits-tool.usa.gov/retirement https://usa.gov/benefit-finder/retirement
if (ctx.route.fullPath === "/retirement" || ctx.route.fullPath === "/retirement/")
ctx.redirect(301, "https://usa.gov/benefit-finder/retirement")

// https://benefits-tool.usa.gov/es/retirement https://usa.gov/es/buscador-beneficios/jubilacion
if (ctx.route.fullPath === "/es/retirement" || ctx.route.fullPath === "/es/retirement/")
ctx.redirect(301, "https://usa.gov/es/buscador-beneficios/jubilacion")
}
3 changes: 0 additions & 3 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ export default {
lazy: true,
langDir: "locales",
defaultLocale: "en",
rootRedirect: {
path: "death-of-a-loved-one",
},
},

// Axios module configuration: https://go.nuxtjs.dev/config-axios
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"license": "See license in CONTRIBUTING.md",
"repository": "https://github.com/GSA/usagov-benefits-eligibility",
"scripts": {
"dev": "gulp && nuxt",
"build": "gulp && nuxt build",
"start": "gulp && nuxt start",
"generate": "gulp && nuxt generate",
"dev": "export NODE_OPTIONS=--openssl-legacy-provider gulp && nuxt",
"build": "export NODE_OPTIONS=--openssl-legacy-provider gulp && nuxt build",
"start": "export NODE_OPTIONS=--openssl-legacy-provider gulp && nuxt start",
"generate": "export NODE_OPTIONS=--openssl-legacy-provider gulp && nuxt generate",
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
"sonarqube": "npm test && ./sonar_scanner_cli.bash",
"lint": "npm run lint:js",
Expand Down
5 changes: 3 additions & 2 deletions pages/_lifeEvent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
class="font-heading-lg tablet:font-heading-xl tablet:margin-top-4 text-secondary print:text-black">
{{ lifeEvent.secondaryHeadline }}
</h1>

<h2 class="text-normal">
{{$t("beta.subheader")}}
</h2>

<p
v-if="lifeEvent.lede"
class="tablet:font-heading-lg line-height-serif-6 text-normal measure-6">
Expand Down Expand Up @@ -215,6 +215,7 @@ import { tObj, tCsv } from "~/services/translation"
export default {
name: "LifeEvent",
layout: "default",
middleware: ['middleware'],
async asyncData({ $content }) {
const landingPage = await $content("landing-page").fetch()
return { landingPage }
Expand Down

0 comments on commit 8ead885

Please sign in to comment.