Merge pull request #18718 from overleaf/jel-isSplitTestActive-plans-page

[web] New plans page variants only loadable if test is active

GitOrigin-RevId: 2b29dc8a3ecef6dd8f34dd25e59bf48a9724061b
This commit is contained in:
Jessica Lawshe 2024-06-05 10:20:32 -05:00 committed by Copybot
parent 3948b6ddb3
commit d7b64ef92e

View file

@ -139,6 +139,14 @@ async function plansPage(req, res) {
}
async function plansPageLightDesign(req, res) {
const splitTestActive = await SplitTestHandler.promises.isSplitTestActive(
'website-redesign-plans'
)
if (!splitTestActive && req.query.preview !== 'true') {
return res.redirect(302, '/user/subscription/plans')
}
res.render('subscriptions/plans-light-design', {
title: 'plans_and_pricing',
})