-
Notifications
You must be signed in to change notification settings - Fork 182
/
app-root.js
50 lines (46 loc) · 1.1 KB
/
app-root.js
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 {
Link,
Icon,
Header,
Tray,
SmartProfile,
SmartServices,
Auth,
Footer
} from '@jetbrains/ring-ui';
import hubLogo from '@jetbrains/logos/hub/hub.svg';
import styles from './app.css';
export default class AppRoot extends Component {
componentDidMount() {
// You can uncomment this after registering your client as a Hub service
// https://www.jetbrains.com/help/hub/2017.3/OAuth-2.0-Authorization.html#d79479e312
// this.auth.init();
}
auth = new Auth({
// clientId: <your client id here>
serverUri: 'https://hub.jetbrains.com' // replace with your Hub server
});
render() {
return (
<div>
<Header>
<Link href="/">
<Icon
glyph={hubLogo}
size={Icon.Size.Size48}
/>
</Link>
<Tray>
<SmartServices auth={this.auth}/>
<SmartProfile auth={this.auth}/>
</Tray>
</Header>
<div className={styles.content}>
{'App content'}
</div>
<Footer/>
</div>
);
}
}