mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Refactor hotjar setup
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
import { hotjar } from 'react-hotjar';
|
||||
import config from "./../config";
|
||||
|
||||
export function setupHotjar() {
|
||||
if (config.hotjar?.id) {
|
||||
let snippetVersion = config.hotjar?.snippetVersion ? config.hotjar?.snippetVersion : 6;
|
||||
|
||||
hotjar.initialize(config.hotjar.id, snippetVersion);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import config from "../config";
|
||||
import colors from './colors.json';
|
||||
import { hotjar } from 'react-hotjar';
|
||||
|
||||
export const getInitialTheme = () => {
|
||||
if (config.themeConfig.disableSwitch) {
|
||||
@@ -67,4 +68,12 @@ export const isThemeDarkish = (theme) => {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export const setupHotjar = () => {
|
||||
if (config.hotjar?.id) {
|
||||
let snippetVersion = config.hotjar?.snippetVersion ? config.hotjar?.snippetVersion : 6;
|
||||
|
||||
hotjar.initialize(config.hotjar.id, snippetVersion);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user