This repository has been archived by the owner on Dec 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.tsx
executable file
·50 lines (47 loc) · 1.67 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React, { Component } from "react";
import { HashRouter, Route } from "react-router-dom";
import * as ReactDOM from "react-dom";
import Repositories from "./Repositories";
import Overview from "./Overview";
import BuildPipelines from "./BuildPipelines";
import ReleasePipelines from "./ReleasePipelines";
import "azure-devops-ui/Core/override.css";
import * as SDK from "azure-devops-extension-sdk";
import { USE_AZDO_SDK } from "./services/Environment";
class App extends Component {
render() {
return (
<HashRouter hashType="noslash">
<div className="flex-grow">
<Route
exact
path="/"
component={() => {
return (
<span className="error">
No report specified.
</span>
);
}}
/>
<Route path="/build-pipelines" component={BuildPipelines} />
<Route
path="/release-pipelines"
component={ReleasePipelines}
/>
<Route path="/repositories" component={Repositories} />
<Route path="/overview" component={Overview} />
</div>
</HashRouter>
);
}
}
if (USE_AZDO_SDK) {
SDK.init();
SDK.ready().then(() => {
ReactDOM.render(<App />, document.getElementById("root"));
SDK.notifyLoadSucceeded();
});
} else {
ReactDOM.render(<App />, document.getElementById("root"));
}