Skip to content

Commit 06209a4

Browse files
committed
fix: Fix links on mobile
1 parent 0d996cc commit 06209a4

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/components/FloatingChatBot/FloatingChatBot.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ const FloatingChatBot = () => {
1010
const history = useHistory();
1111
const navigatePage = (page, params) => {
1212
if (page.startsWith("https")) {
13-
window.open(page);
13+
if (isDesktop) {
14+
window.open(page);
15+
} else {
16+
window.location.href = page;
17+
}
1418
} else {
1519
if (!isDesktop) {
1620
params.openChat(false);
@@ -48,7 +52,7 @@ const FloatingChatBot = () => {
4852
path: "process_options"
4953
},
5054
prompt_again: {
51-
message: "Do you need any other help?",
55+
message: isDesktop ? "Do you need any other help?" : "",
5256
options: helpOptions,
5357
path: "process_options"
5458
},

src/components/LandingPageChatBot/LandingPageChatBot.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ const LandingPageChatBot = () => {
1111
const history = useHistory();
1212
const navigatePage = (page, params) => {
1313
if (page.startsWith("https")) {
14-
window.open(page);
14+
if (isDesktop) {
15+
window.open(page);
16+
} else {
17+
window.location.href = page;
18+
}
1519
} else {
1620
if (!isDesktop) {
1721
params.openChat(false);
@@ -92,7 +96,7 @@ const LandingPageChatBot = () => {
9296
path: "process_options"
9397
},
9498
prompt_again: {
95-
message: "Do you need any other help?",
99+
message: isDesktop ? "Do you need any other help?" : "",
96100
options: helpOptions,
97101
path: "process_options"
98102
},

0 commit comments

Comments
 (0)