Skip to content

Commit 1bb4e5b

Browse files
authored
Merge pull request #55589 from nkdengineer/fix/55483
Display get started tooltip for only onboarding admin room
2 parents 632a035 + 402a4e9 commit 1bb4e5b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/LHNOptionsList/OptionRowLHN.tsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Performance from '@libs/Performance';
3030
import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager';
3131
import {
3232
isAdminRoom,
33-
isChatUsedForOnboarding,
33+
isChatUsedForOnboarding as isChatUsedForOnboardingReportUtils,
3434
isConciergeChatReport,
3535
isGroupChat,
3636
isOneOnOneChat,
@@ -62,7 +62,8 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
6262
const session = useSession();
6363
const shouldShowWokspaceChatTooltip = isPolicyExpenseChat(report) && activePolicyID === report?.policyID && session?.accountID === report?.ownerAccountID;
6464
const isOnboardingGuideAssigned = introSelected?.choice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM && !session?.email?.includes('+');
65-
const shouldShowGetStartedTooltip = isOnboardingGuideAssigned ? isAdminRoom(report) : isConciergeChatReport(report);
65+
const isChatUsedForOnboarding = isChatUsedForOnboardingReportUtils(report, introSelected?.choice);
66+
const shouldShowGetStartedTooltip = isOnboardingGuideAssigned ? isAdminRoom(report) && isChatUsedForOnboarding : isConciergeChatReport(report);
6667
const isActiveRouteHome = useIsCurrentRouteHome();
6768

6869
const {tooltipToRender, shouldShowTooltip} = useMemo(() => {
@@ -76,9 +77,6 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
7677

7778
const {shouldShowProductTrainingTooltip, renderProductTrainingTooltip, hideProductTrainingTooltip} = useProductTrainingContext(tooltipToRender, shouldShowTooltip);
7879

79-
// During the onboarding flow, the introSelected NVP is not yet available.
80-
const [onboardingPurposeSelected] = useOnyx(ONYXKEYS.ONBOARDING_PURPOSE_SELECTED);
81-
8280
const {translate} = useLocalize();
8381
const [isContextMenuActive, setIsContextMenuActive] = useState(false);
8482

@@ -283,7 +281,7 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
283281
isSystemChat(report)
284282
}
285283
/>
286-
{isChatUsedForOnboarding(report, onboardingPurposeSelected) && <FreeTrial badgeStyles={[styles.mnh0, styles.pl2, styles.pr2, styles.ml1]} />}
284+
{isChatUsedForOnboarding && <FreeTrial badgeStyles={[styles.mnh0, styles.pl2, styles.pr2, styles.ml1]} />}
287285
{isStatusVisible && (
288286
<Tooltip
289287
text={statusContent}

0 commit comments

Comments
 (0)