Skip to content

Commit

Permalink
chore: adding chatbot in beta (#3167)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Burtey <[email protected]>
  • Loading branch information
nicolasburtey and Nicolas Burtey authored Apr 13, 2024
1 parent bbf1258 commit 0486d73
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
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

0 comments on commit 0486d73

Please sign in to comment.