Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions web-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@emotion/styled": "11.8.1",
"@faker-js/faker": "^6.0.0",
"@hookform/resolvers": "^2.8.8",
"@intercom/messenger-js-sdk": "^0.0.14",
"@mui/icons-material": "^5.11.0",
"@mui/lab": "^5.0.0-alpha.152",
"@mui/material": "^5.14.17",
Expand Down
19 changes: 4 additions & 15 deletions web-server/src/components/AppHead.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Intercom from '@intercom/messenger-js-sdk';
import Head from 'next/head';
import { useRouter } from 'next/router';
import Script from 'next/script';
Expand All @@ -11,7 +12,9 @@ export const AppHead = () => {

useEffect(() => {
const isDev = process.env.NEXT_PUBLIC_APP_ENVIRONMENT === 'development';

Intercom({
app_id: 'kckm1m2e'
});
if (!isDev) {
const onFocus = () => track('WINDOW_FOCUS');
const onBlur = () => track('WINDOW_BLUR');
Expand Down Expand Up @@ -42,14 +45,6 @@ export const AppHead = () => {

gtag('config', '${process.env.NEXT_PUBLIC_GA}');`}
</Script>
<Script
src={`https://ind-widget.freshworks.com/widgets/88000000019.js`}
strategy="afterInteractive"
/>
<Script id="support-channel" strategy="afterInteractive">
{`window.fwSettings={'widget_id':88000000019};
!function(){if("function"!=typeof window.FreshworksWidget){var n=function(){n.q.push(arguments)};n.q=[],window.FreshworksWidget=n}}()`}
</Script>
<Script>
{`document.addEventListener("wheel", function(event){
if(document.activeElement.type === "number"){
Expand All @@ -72,12 +67,6 @@ export const AppHead = () => {
.vis-tooltip {
position: absolute;
}
#freshworks-container #launcher-frame {
color-scheme: normal;
}
#freshworks-container {
z-index: 2147483646 !important
}
[class^=chartsjs-reset-zoom-btn-] {
display: none1;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { showNewMessage } from '@intercom/messenger-js-sdk';
import { Button, Card, Link } from '@mui/material';
import { useRouter } from 'next/router';
import { FC, useEffect, useMemo } from 'react';
Expand All @@ -13,11 +14,7 @@ import { Line } from '../Text';

const helpdeskPrefill = (error: string, details: string) => {
if (typeof window === 'undefined') return;
// @ts-ignore
window.FreshworksWidget?.('prefill', 'ticketForm', {
subject: error,
description: details
});
showNewMessage(`${error}\n\n${details}`);
};

export const useHelpdeskPrefill = (error: string, details: string) => {
Expand Down
5 changes: 5 additions & 0 deletions web-server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,11 @@
resolved "https://registry.yarnpkg.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz#56f00962ff0c4e0eb93d34a047d29fa995e3e342"
integrity sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==

"@intercom/messenger-js-sdk@^0.0.14":
version "0.0.14"
resolved "https://registry.yarnpkg.com/@intercom/messenger-js-sdk/-/messenger-js-sdk-0.0.14.tgz#a27999370cc0a82a2a57a779426df25a57891863"
integrity sha512-2dH4BDAh9EI90K7hUkAdZ76W79LM45Sd1OBX7t6Vzy8twpNiQ5X+7sH9G5hlJlkSGnf+vFWlFcy9TOYAyEs1hA==

"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
Expand Down