|
@@ -3,6 +3,7 @@ import { RouteComponentProps, withRouter } from "react-router";
|
|
|
import styled from "styled-components";
|
|
import styled from "styled-components";
|
|
|
|
|
|
|
|
import api from "shared/api";
|
|
import api from "shared/api";
|
|
|
|
|
+import { H } from "highlight.run";
|
|
|
import { Context } from "shared/Context";
|
|
import { Context } from "shared/Context";
|
|
|
import { PorterUrl } from "shared/routing";
|
|
import { PorterUrl } from "shared/routing";
|
|
|
import { ClusterType, ProjectType } from "shared/types";
|
|
import { ClusterType, ProjectType } from "shared/types";
|
|
@@ -89,7 +90,6 @@ class Home extends Component<PropsType, StateType> {
|
|
|
api
|
|
api
|
|
|
.getCapabilities("<token>", {}, {})
|
|
.getCapabilities("<token>", {}, {})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- console.log(res.data);
|
|
|
|
|
this.context.setCapabilities(res.data);
|
|
this.context.setCapabilities(res.data);
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
@@ -217,6 +217,14 @@ class Home extends Component<PropsType, StateType> {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
|
|
|
+ let { user } = this.context;
|
|
|
|
|
+
|
|
|
|
|
+ // Initialize Highlight
|
|
|
|
|
+ if (window.location.href.includes("dashboard.getporter.dev")) {
|
|
|
|
|
+ H.init("y2d13lgr");
|
|
|
|
|
+ H.identify(user.email, { id: user.id });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// Handle redirect from DO
|
|
// Handle redirect from DO
|
|
|
let queryString = window.location.search;
|
|
let queryString = window.location.search;
|
|
|
let urlParams = new URLSearchParams(queryString);
|
|
let urlParams = new URLSearchParams(queryString);
|