UNPKG
dtrum-react-kit
Version:
latest (0.0.5)
0.0.5
0.0.4
0.0.3
Dynatrace tools and react hooks collection
dtrum-react-kit
/
src
/
tools
/
sendDtrumAction.ts
13 lines
(8 loc)
•
265 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
export
const
sendDtrumAction
= (
actionName
:
string
,
callback
?: () =>
void
) => {
const
{ dtrum =
undefined
} =
window
;
if
(!dtrum)
return
callback?.();
const
action = dtrum.
enterAction
(actionName); callback?.(); dtrum.
leaveAction
(action);
return
; };