fix: only fire event if dashboard actually opens (#97)
This commit is contained in:
@@ -30,7 +30,11 @@ export const useEnterpriseDashboardHook = () => {
|
||||
setShowModal(false);
|
||||
};
|
||||
|
||||
React.useEffect(trackOpened, []);
|
||||
React.useEffect(() => {
|
||||
if (dashboard && dashboard.label) {
|
||||
trackOpened();
|
||||
}
|
||||
}, []); // eslint-disable-line
|
||||
|
||||
return {
|
||||
showModal,
|
||||
|
||||
Reference in New Issue
Block a user