Merge pull request #15685 from overleaf/rd-newsletter-homepage

[web] Hide newsletter checkbox on the homepage when token-confirmation-odc variant is active

GitOrigin-RevId: b5c0c1fdf205c99584ae7b6b461b13a73745fef3
This commit is contained in:
Rebeka Dekany 2023-11-09 09:24:22 +01:00 committed by Copybot
parent da401ce5f9
commit 4dd2635c40

View file

@ -57,8 +57,18 @@ module.exports = HomeController = {
'failed to get "design-system-updates" split test assignment'
)
}
const onboardingFlowAssignment =
await SplitTestHandler.promises.getAssignment(
req,
res,
'onboarding-flow'
)
return res.render('external/home/v2', {
designSystemUpdatesVariant: designSystemUpdatesAssignment.variant,
hideNewsletterCheckbox:
onboardingFlowAssignment?.variant === 'token-confirmation-odc',
})
} else {
return res.redirect('/login')