Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adding chatbot in beta #3167

Merged
merged 1 commit into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions app/components/contact-modal/contact-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Linking } from "react-native"
import ReactNativeModal from "react-native-modal"

import { CONTACT_EMAIL_ADDRESS, WHATSAPP_CONTACT_NUMBER } from "@app/config"
import { useBetaQuery } from "@app/graphql/generated"
import { useI18nContext } from "@app/i18n/i18n-react"
import { RootStackParamList } from "@app/navigation/stack-param-lists"
import { openWhatsApp } from "@app/utils/external"
Expand Down Expand Up @@ -50,6 +51,8 @@ const ContactModal: React.FC<Props> = ({

const navigation = useNavigation<StackNavigationProp<RootStackParamList>>()

const betaActivated = useBetaQuery().data?.beta ?? false

const contactOptionList = [
{
id: SupportChannels.Chatbot,
Expand Down Expand Up @@ -130,6 +133,7 @@ const ContactModal: React.FC<Props> = ({
>
{contactOptionList
.filter((item) => supportChannels.includes(item.id))
.filter((item) => (item.id === SupportChannels.Chatbot ? betaActivated : true))
.map((item) => {
return (
<ListItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const ContactSupportButton = ({
supportChannels={[
SupportChannels.Faq,
SupportChannels.StatusPage,
SupportChannels.Chatbot,
SupportChannels.Email,
]}
/>
Expand Down
1 change: 1 addition & 0 deletions app/screens/error-screen/error-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const ErrorScreen = ({
supportChannels={[
SupportChannels.Faq,
SupportChannels.StatusPage,
SupportChannels.Chatbot,
SupportChannels.Email,
SupportChannels.Telegram,
SupportChannels.Mattermost,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const NeedHelpSetting: React.FC = () => {
supportChannels={[
SupportChannels.Faq,
SupportChannels.StatusPage,
SupportChannels.Chatbot,
SupportChannels.Email,
]}
/>
Expand Down
Loading