insomnia/plugins/insomnia-plugin-kong-portal/index.js
Jack Kavanagh 48ac330d95
chore: move GA events to segment (#4403)
* drop events

* move pageview to segment

* replace trackEvent with trackSegmentEvent

* remove categories and set ids

* remove duplicate events

* fxi tests

* fix lint

* fix inso

* use analytics setting and dont log boring stuff

* add context to page view
2022-01-25 14:50:46 +00:00

30 lines
729 B
JavaScript

import React from 'react';
import ReactDOM from 'react-dom';
import DeployToPortal from './src/deploy-to-portal';
export const documentActions = [
{
label: 'Deploy to Dev Portal',
hideAfterClick: true,
action(context, spec) {
const root = document.createElement('div');
ReactDOM.render(
<DeployToPortal
spec={spec}
store={context.store}
axios={context.__private.axios}
trackSegmentEvent={context.__private.analytics.trackSegmentEvent}
/>,
root,
);
context.app.dialog('Deploy to Dev Portal', root, {
skinny: true,
onHide() {
ReactDOM.unmountComponentAtNode(root);
},
});
},
},
];