Merge pull request #17230 from overleaf/mf-tear-down-inr-2

[web] Tear down INR split test

GitOrigin-RevId: 90c6ab4666d9281e804b279d697d6c14ffd682d2
This commit is contained in:
M Fahru
2024-02-22 09:05:02 +00:00
committed by Copybot
parent 23281255a1
commit dc9b0aa8a5
18 changed files with 233 additions and 228 deletions
@@ -363,28 +363,14 @@ async function projectListPage(req, res, next) {
'writefull-integration'
)
let showInrGeoBanner, inrGeoBannerSplitTestName
let inrGeoBannerVariant = 'default'
let showInrGeoBanner = false
let recommendedCurrency
if (usersBestSubscription?.type === 'free') {
const { countryCode } = await GeoIpLookup.promises.getCurrencyCode(req.ip)
// Split test is kept active, but all users geolocated in India can
// now use the INR currency (See #13507)
const { variant: inrGeoPricingVariant } =
await SplitTestHandler.promises.getAssignment(req, res, 'geo-pricing-inr')
if (countryCode === 'IN') {
inrGeoBannerSplitTestName =
inrGeoPricingVariant === 'inr'
? 'geo-banners-inr-2'
: 'geo-banners-inr-1'
const geoBannerAssignment = await SplitTestHandler.promises.getAssignment(
req,
res,
inrGeoBannerSplitTestName
)
showInrGeoBanner = true
inrGeoBannerVariant = geoBannerAssignment.variant
}
}
@@ -437,8 +423,6 @@ async function projectListPage(req, res, next) {
showWritefullPromoBanner,
recommendedCurrency,
showInrGeoBanner,
inrGeoBannerVariant,
inrGeoBannerSplitTestName,
projectDashboardReact: true, // used in navbar
groupSsoSetupSuccess,
groupSubscriptionsPendingEnrollment: