Skip to content

Commit

Permalink
WEBREL-3310/Prince/fixed server config issues (#398)
Browse files Browse the repository at this point in the history
* fix: server config issues

* fix: potential trackJS errors

* fix: potential trackJS errors
  • Loading branch information
prince-deriv authored Nov 7, 2024
1 parent 76caa57 commit 5ea6e67
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 60 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@deriv-com/auth-client": "1.0.27",
"@deriv-com/translations": "^1.3.9",
"@deriv-com/ui": "^1.35.6",
"@deriv-com/utils": "^0.0.34",
"@deriv-com/utils": "^0.0.38",
"@deriv/quill-icons": "^2.1.2",
"@sendbird/chat": "^4.11.3",
"@tanstack/react-query": "^5.28.14",
Expand Down
5 changes: 2 additions & 3 deletions src/hooks/custom-hooks/useDerivAnalytics.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import Cookies from 'js-cookie';
import { FIREBASE_INIT_DATA } from '@/constants';
import getCountry from '@/utils/get-country';
import { Analytics } from '@deriv-com/analytics';
import { useWebsiteStatus } from '@deriv-com/api-hooks';
import { useDevice } from '@deriv-com/ui';
import { LocalStorageConstants, LocalStorageUtils, WebSocketUtils } from '@deriv-com/utils';
import { CountryUtils, LocalStorageConstants, LocalStorageUtils, WebSocketUtils } from '@deriv-com/utils';
import { useActiveAccount } from '../api/account';

/**
Expand Down Expand Up @@ -48,7 +47,7 @@ const useDerivAnalytics = () => {
attributes: {
account_type: activeAccount?.account_type || 'unlogged',
app_id: String(WebSocketUtils.getAppId()),
country: await getCountry(),
country: await CountryUtils.getCountry(),
device_language: navigator?.language || 'en-EN',
device_type: isMobile ? 'mobile' : 'desktop',
domain: window.location.hostname,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/custom-hooks/useFreshchat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { useScript } from 'usehooks-ts';

const useFreshChat = (token: string | null) => {
const scriptStatus = useScript('https://static.deriv.com/scripts/freshchat.js');
const scriptStatus = useScript('https://static.deriv.com/scripts/freshchat/freshchat-1.0.1.js');
const [isReady, setIsReady] = useState(false);
const language = localStorage.getItem('i18n_language') || 'EN';

Expand Down
36 changes: 0 additions & 36 deletions src/utils/__tests__/get-country.spec.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/utils/get-country.ts

This file was deleted.

0 comments on commit 5ea6e67

Please sign in to comment.