Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit b41a212

Browse files
authored
Add tawk to chat box (#179)
1 parent 28c7e3e commit b41a212

File tree

3 files changed

+295
-1
lines changed

3 files changed

+295
-1
lines changed

package-lock.json

Lines changed: 285 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"redux-logger": "^3.0.6",
107107
"redux-thunk": "^2.3.0",
108108
"swiper": "^6.3.5",
109+
"tawkto-react": "^1.0.11",
109110
"uuid": "^7.0.3",
110111
"yup": "^0.28.3"
111112
},

src/App.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useEffect } from 'react';
22
import { Router } from 'react-router-dom';
33
import { createBrowserHistory } from 'history';
44
import { create } from 'jss';
@@ -30,6 +30,10 @@ library.add(fab, faEnvelope);
3030
const history = createBrowserHistory();
3131
const jss = create({ plugins: [...jssPreset().plugins, rtl()] });
3232

33+
const tawkTo = require('tawkto-react');
34+
35+
const tawkToPropertyId = '5f6b99364704467e89f1b758';
36+
3337
const useStyles = makeStyles(() =>
3438
createStyles({
3539
'@global': {
@@ -61,6 +65,10 @@ const useStyles = makeStyles(() =>
6165
function App() {
6266
useStyles();
6367

68+
useEffect(() => {
69+
tawkTo(tawkToPropertyId);
70+
}, []);
71+
6472
const { settings } = useSettings();
6573

6674
return (

0 commit comments

Comments
 (0)