Merge pull request #10435 from overleaf/msm-remove-survey-banner

Remove banner to recruit new joiners for survey

GitOrigin-RevId: c427c57b80d6e38285ddbafc67554b62516ea8b8
This commit is contained in:
Miguel Serrano
2022-11-16 12:34:46 +01:00
committed by Copybot
parent d15547dcc2
commit edeaa4baa0
5 changed files with 4 additions and 68 deletions

View File

@@ -509,24 +509,6 @@ const ProjectController = {
}
)
},
newJoinerSurveyBannerActive(cb) {
SplitTestHandler.getAssignment(
req,
res,
'new-joiner-survey-banner',
(err, assignment) => {
if (err) {
logger.warn(
{ err },
'failed to get "new-joiner-survey-banner" split test assignment'
)
cb(null, false)
} else {
cb(null, assignment.variant === 'active')
}
}
)
},
survey(cb) {
SurveyHandler.getSurvey(userId, (err, survey) => {
if (err) {
@@ -544,13 +526,8 @@ const ProjectController = {
OError.tag(err, 'error getting data for project list page')
return next(err)
}
const {
notifications,
user,
userEmailsData,
primaryEmailCheckActive,
newJoinerSurveyBannerActive,
} = results
const { notifications, user, userEmailsData, primaryEmailCheckActive } =
results
if (
user &&
@@ -679,12 +656,6 @@ const ProjectController = {
)
}
const isNewJoiner =
user.signUpDate &&
Date.now() - user.signUpDate.getTime() < 1000 * 60 * 60 * 24
const shouldDisplayNewJoinerBanner =
newJoinerSurveyBannerActive && isNewJoiner
ProjectController._injectProjectUsers(projects, (error, projects) => {
if (error != null) {
return next(error)
@@ -709,7 +680,6 @@ const ProjectController = {
showThinFooter: true, // don't show the fat footer on the projects dashboard, as there's a fixed space available
usersBestSubscription: results.usersBestSubscription,
survey: results.survey,
shouldDisplayNewJoinerBanner,
}
const paidUser =