Skip to content

Commit 966203b

Browse files
marcochavezfclaude
andcommitted
Remove messageTail variable, concatenate directly on message
Address review feedback to simplify the switch by appending directly to message instead of using an intermediate variable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5d195ac commit 966203b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/libs/ReportUtils.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11634,30 +11634,29 @@ function getBespokeWelcomeMessage(companySize: OnboardingCompanySize | undefined
1163411634
// escapes HTML entities before parsing, so raw HTML tags would render as literal text.
1163511635
const welcomeHeader = "# Your free trial has started! Let's get you set up.\n👋 Hey there! I'm your Expensify setup specialist. ";
1163611636

11637-
let messageTail: string;
11637+
let message = welcomeHeader;
1163811638
switch (companySize) {
1163911639
case CONST.ONBOARDING_COMPANY_SIZE.MEDIUM:
1164011640
case CONST.ONBOARDING_COMPANY_SIZE.LARGE:
11641-
messageTail =
11641+
message +=
1164211642
'For an organization your size, the fastest path to value is setting up approval workflows, ' +
1164311643
'connecting your accounting software, and rolling out the Expensify Card to your team. ' +
1164411644
"I'm here to walk you through each step — just ask!";
1164511645
break;
1164611646
case CONST.ONBOARDING_COMPANY_SIZE.SMALL:
1164711647
case CONST.ONBOARDING_COMPANY_SIZE.MEDIUM_SMALL:
11648-
messageTail =
11648+
message +=
1164911649
'For a growing team like yours, the fastest way to get value is to set up expense categories, ' +
1165011650
'configure approval workflows, and invite your team members. ' +
1165111651
"I'm here to walk you through each step — just ask!";
1165211652
break;
1165311653
default:
11654-
messageTail =
11654+
message +=
1165511655
'For a small team like yours, the fastest way to get value is to set up a few expense categories, ' +
1165611656
'invite your team members, and have them start snapping receipts right away. ' +
1165711657
"I'm here to walk you through each step — just ask!";
1165811658
break;
1165911659
}
11660-
let message = welcomeHeader + messageTail;
1166111660

1166211661
if (userReportedIntegration && userReportedIntegration !== 'other') {
1166311662
const friendlyName = CONST.ONBOARDING_ACCOUNTING_MAPPING[userReportedIntegration as keyof typeof CONST.ONBOARDING_ACCOUNTING_MAPPING];

0 commit comments

Comments
 (0)