Skip to content

Commit

Permalink
Redirect /new-member page without campaign code
Browse files Browse the repository at this point in the history
  • Loading branch information
alebedev committed Jul 17, 2023
1 parent a371b95 commit 9c47a1a
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

0 comments on commit 9c47a1a

Please sign in to comment.