Skip to content

Commit

Permalink
feat: add clear option for the chatbot (GaloyMoney#3247)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Burtey <nb@galoy.io>
  • Loading branch information
nicolasburtey and Nicolas Burtey authored May 6, 2024
1 parent 7f2d16b commit 10ac811
Show file tree
Hide file tree
Showing 23 changed files with 250 additions and 820 deletions.
2 changes: 1 addition & 1 deletion .storybook/storybook.requires.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const getStories = () => {
"./app/screens/authentication-screen/authentication-check-screen.stories.tsx": require("../app/screens/authentication-screen/authentication-check-screen.stories.tsx"),
"./app/screens/authentication-screen/authentication-screen.stories.tsx": require("../app/screens/authentication-screen/authentication-screen.stories.tsx"),
"./app/screens/authentication-screen/pin-screen.stories.tsx": require("../app/screens/authentication-screen/pin-screen.stories.tsx"),
"./app/screens/chatbot-screen/chatbot.stories.tsx": require("../app/screens/chatbot-screen/chatbot.stories.tsx"),
"./app/screens/conversion-flow/conversion-success-screen.stories.tsx": require("../app/screens/conversion-flow/conversion-success-screen.stories.tsx"),
"./app/screens/earns-map-screen/earns-map-screen.stories.tsx": require("../app/screens/earns-map-screen/earns-map-screen.stories.tsx"),
"./app/screens/earns-screen/earns-quiz.stories.tsx": require("../app/screens/earns-screen/earns-quiz.stories.tsx"),
Expand Down Expand Up @@ -105,6 +104,7 @@ const getStories = () => {
"./app/screens/settings-screen/settings-screen.stories.tsx": require("../app/screens/settings-screen/settings-screen.stories.tsx"),
"./app/screens/settings-screen/settings.stories.tsx": require("../app/screens/settings-screen/settings.stories.tsx"),
"./app/screens/settings-screen/theme-screen.stories.tsx": require("../app/screens/settings-screen/theme-screen.stories.tsx"),
"./app/screens/support-chat-screen/support-chat.stories.tsx": require("../app/screens/support-chat-screen/support-chat.stories.tsx"),
"./app/screens/transaction-detail-screen/transaction-detail-screen.stories.tsx": require("../app/screens/transaction-detail-screen/transaction-detail-screen.stories.tsx"),
};
};
Expand Down
2 changes: 1 addition & 1 deletion .storybook/storybook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RNBootSplash.hide({ fade: true })
const StorybookUI = getStorybookUI({
enableWebsockets: true,
onDeviceUI: true,
initialSelection: { kind: "Failed device account modal", name: "Default" },
initialSelection: { kind: "ChatBot Screen", name: "Default" },
shouldPersistSelection: false,
})

Expand Down
99 changes: 0 additions & 99 deletions app/components/april-challenge/card.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions app/components/april-challenge/index.tsx

This file was deleted.

131 changes: 0 additions & 131 deletions app/components/april-challenge/modal.tsx

This file was deleted.

10 changes: 3 additions & 7 deletions app/components/contact-modal/contact-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ 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 All @@ -20,7 +19,7 @@ export const SupportChannels = {
StatusPage: "statusPage",
Mattermost: "mattermost",
Faq: "faq",
Chatbot: "chatbot",
SupportChat: "supportChat",
} as const

export type SupportChannels = (typeof SupportChannels)[keyof typeof SupportChannels]
Expand Down Expand Up @@ -51,15 +50,13 @@ const ContactModal: React.FC<Props> = ({

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

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

const contactOptionList = [
{
id: SupportChannels.Chatbot,
id: SupportChannels.SupportChat,
name: LL.support.chatbot(),
icon: <Icon name={"chatbubbles-outline"} type="ionicon" />,
action: () => {
navigation.navigate("chatbot")
navigation.navigate("supportChat")
toggleModal()
},
},
Expand Down Expand Up @@ -133,7 +130,6 @@ 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,7 +39,7 @@ export const ContactSupportButton = ({
supportChannels={[
SupportChannels.Faq,
SupportChannels.StatusPage,
SupportChannels.Chatbot,
SupportChannels.SupportChat,
SupportChannels.Email,
]}
/>
Expand Down
Loading

0 comments on commit 10ac811

Please sign in to comment.