Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions src/pages/settings/HelpPage/HelpPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import useOnyx from '@hooks/useOnyx';
import useOpenConciergeAnywhere from '@hooks/useOpenConciergeAnywhere';
import usePermissions from '@hooks/usePermissions';
import usePersonalDetailByLogin from '@hooks/usePersonalDetailByLogin';
import {useAllPersonalDetails} from '@hooks/usePersonalDetails';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
Expand Down Expand Up @@ -65,7 +64,6 @@ function HelpPage() {
const [conciergeChat] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${conciergeReportID}`);
const {accountID: currentUserAccountID} = useCurrentUserPersonalDetails();
const {openConciergeAnywhere} = useOpenConciergeAnywhere();
const {isBetaEnabled} = usePermissions();
const {isOffline} = useNetwork();

const openSupportTicketOrConcierge = () => {
Expand Down Expand Up @@ -212,22 +210,20 @@ function HelpPage() {
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_HELP.HELP_DOCS,
};

const talkToAHumanItem = isBetaEnabled(CONST.BETAS.SUPPORT_TICKET)
? {
key: 'initialSettingsPage.talkToAHuman',
title: translate('initialSettingsPage.talkToAHuman'),
description: translate('initialSettingsPage.helpPage.talkToAHumanDescription'),
icon: icons.ChatBubbles,
iconType: CONST.ICON_TYPE_ICON,
onPress: openSupportTicketOrConcierge,
isDisabled: isOffline,
shouldShowRightIcon: true,
wrapperStyle: [styles.sectionMenuItemTopDescription],
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_HELP.SUPPORT_TICKET,
}
: null;
const talkToAHumanItem = {
key: 'initialSettingsPage.talkToAHuman',
title: translate('initialSettingsPage.talkToAHuman'),
description: translate('initialSettingsPage.helpPage.talkToAHumanDescription'),
icon: icons.ChatBubbles,
iconType: CONST.ICON_TYPE_ICON,
onPress: openSupportTicketOrConcierge,
isDisabled: isOffline,
shouldShowRightIcon: true,
wrapperStyle: [styles.sectionMenuItemTopDescription],
sentryLabel: CONST.SENTRY_LABEL.SETTINGS_HELP.SUPPORT_TICKET,
};

const moreResourcesItems = [...(hasActiveItem ? [] : [conciergeItem]), ...(talkToAHumanItem ? [talkToAHumanItem] : []), helpSiteItem];
const moreResourcesItems = [...(hasActiveItem ? [] : [conciergeItem]), talkToAHumanItem, helpSiteItem];

useEffect(() => {
openHelpPage();
Expand Down
Loading