@capytale/meta-player 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
ReactNode,
|
|
5
5
|
createContext,
|
|
6
6
|
useContext,
|
|
7
|
+
useEffect,
|
|
7
8
|
useState,
|
|
8
9
|
} from "react";
|
|
9
10
|
|
|
@@ -17,6 +18,8 @@ import { useAppDispatch } from "../../app/hooks";
|
|
|
17
18
|
import ActivitySession from "@capytale/activity.js/activity/activitySession";
|
|
18
19
|
import { setActivityJSData } from "../activityData/activityDataSlice";
|
|
19
20
|
|
|
21
|
+
import tracker from "@capytale/activity.js/backend/capytale/tracker";
|
|
22
|
+
|
|
20
23
|
const ActivityJSContext = createContext<ActivitySessionLoaderReturnValue>({
|
|
21
24
|
state: "loading",
|
|
22
25
|
activitySession: null,
|
|
@@ -32,10 +35,14 @@ export const ActivityJSProvider: FC<ActivityJSProviderProps> = (props) => {
|
|
|
32
35
|
const activityId = getIdFromUrl();
|
|
33
36
|
const dispatch = useAppDispatch();
|
|
34
37
|
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
tracker.trackPageView();
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
35
42
|
const callback = (data: ActivitySession) => {
|
|
36
43
|
//@ts-expect-error
|
|
37
44
|
window.capy = data;
|
|
38
|
-
|
|
45
|
+
|
|
39
46
|
const ab = data.activityBunch;
|
|
40
47
|
/*
|
|
41
48
|
console.log("Test accès");
|
|
@@ -87,6 +94,7 @@ export const ActivityJSProvider: FC<ActivityJSProviderProps> = (props) => {
|
|
|
87
94
|
workflow: ab.assignmentNode?.workflow,
|
|
88
95
|
}),
|
|
89
96
|
);
|
|
97
|
+
tracker.trackActivity(data);
|
|
90
98
|
setLoaded(true);
|
|
91
99
|
};
|
|
92
100
|
|