Skip to content

Commit

Permalink
Redirect /new-member page without campaign code (#2797)
Browse files Browse the repository at this point in the history
<!--
PR title: GRW-123 / Feature / Awesome new thing
-->

## Describe your changes

Redirect new-member page without code to products page

<!--
What changes are made?
If there are many changes, a list might be a good format.
If it makes sense, add screenshots and/or screen recordings here.
-->

## Justify why they are needed

Continue draining traffic from old site

## Checklist before requesting a review

- [x] I have performed a self-review of my code
  • Loading branch information
alebedev committed Jul 17, 2023
1 parent a371b95 commit 18372e8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions apps/store/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,20 @@ module.exports = withBundleAnalyzer({
locale: false,
})),
]
const oldSiteCampaigns =
const oldSiteRedirects =
process.env.FEATURE_OLD_SITE_REDIRECTS === 'true'
? [
{
source: '/(se/)?new-member(/hedvig)?',
has: [
{
type: 'query',
key: 'code',
},
],
permanent: false,
has: [{ type: 'query', key: 'code' }],
destination: '/api/campaign/:code?code=&next=/se/forsakringar',
permanent: false,
locale: false,
},
{
source: '/(se/)?new-member(/hedvig)?',
destination: '/se/forsakringar',
permanent: false,
locale: false,
},
{
Expand All @@ -134,7 +135,7 @@ module.exports = withBundleAnalyzer({
},
]
: []
return [...shutDownMarketsInfo, ...oldSiteCampaigns, ...getExperimentVariantRedirects()]
return [...shutDownMarketsInfo, ...oldSiteRedirects, ...getExperimentVariantRedirects()]
},
})

Expand Down

1 comment on commit 18372e8

@vercel
Copy link

@vercel vercel bot commented on 18372e8 Jul 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.