From 9c47a1a5f59697d922d56b7b515a4e89066bd968 Mon Sep 17 00:00:00 2001 From: Alexander Lebedev Date: Mon, 17 Jul 2023 14:09:48 +0200 Subject: [PATCH] Redirect /new-member page without campaign code --- apps/store/next.config.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/apps/store/next.config.js b/apps/store/next.config.js index b109b5ccf9..d1980c961b 100644 --- a/apps/store/next.config.js +++ b/apps/store/next.config.js @@ -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, }, { @@ -134,7 +135,7 @@ module.exports = withBundleAnalyzer({ }, ] : [] - return [...shutDownMarketsInfo, ...oldSiteCampaigns, ...getExperimentVariantRedirects()] + return [...shutDownMarketsInfo, ...oldSiteRedirects, ...getExperimentVariantRedirects()] }, })