Skip to content

Commit

Permalink
Merge pull request #417 from sharemindteam/hotfix/clarity_error_416
Browse files Browse the repository at this point in the history
Hotfix/clarity error 416
  • Loading branch information
rmdnps10 authored Nov 6, 2024
2 parents 803b2a0 + 46571eb commit 9515124
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"react-cookie": "^7.0.1",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-microsoft-clarity": "^1.2.0",
"react-router-dom": "^6.21.1",
"react-scripts": "5.0.1",
"react-textarea-autosize": "^8.5.3",
Expand Down
16 changes: 0 additions & 16 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Clarity tag -->
<script type="text/javascript">
(function (c, l, a, r, i, t, y) {
c[a] =
c[a] ||
function () {
(c[a].q = c[a].q || []).push(arguments);
};
t = l.createElement(r);
t.async = 1;
t.src = 'https://www.clarity.ms/tag/' + i;
y = l.getElementsByTagName(r)[0];
y.parentNode.insertBefore(t, y);
})(window, document, 'clarity', 'script', 'n11jaqdy8d');
</script>

<!-- Google tag (gtag.js) -->
<script
async
Expand Down
6 changes: 6 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { StompProvider } from 'contexts/StompContext';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import AppLayout from 'App.Layout';

import { clarity } from 'react-microsoft-clarity';

axios.defaults.withCredentials = true;

const root = ReactDOM.createRoot(
Expand All @@ -18,6 +20,10 @@ const root = ReactDOM.createRoot(

const queryClient = new QueryClient();

if (process.env.NODE_ENV === 'production') {
clarity.init(process.env.REACT_APP_CLARITY_ID as string);
}

root.render(
<BrowserRouter>
<RecoilRoot>
Expand Down

0 comments on commit 9515124

Please sign in to comment.