File tree 3 files changed +34
-16
lines changed 3 files changed +34
-16
lines changed Original file line number Diff line number Diff line change
1
+ import Paper from "@material-ui/core/Paper"
2
+ import Typography from "@material-ui/core/Typography"
3
+ import { makeStyles } from "@material-ui/core/styles"
4
+ import React from "react"
5
+ import { CodeExample } from "../CodeExample"
6
+
7
+ export interface CliAuthTokenProps {
8
+ sessionToken : string
9
+ }
10
+
11
+ export const CliAuthToken : React . FC < CliAuthTokenProps > = ( { sessionToken } ) => {
12
+ const styles = useStyles ( )
13
+ return (
14
+ < Paper className = { styles . container } >
15
+ < Typography className = { styles . title } > Session Token</ Typography >
16
+ < CodeExample code = { sessionToken } />
17
+ </ Paper >
18
+ )
19
+ }
20
+
21
+ const useStyles = makeStyles ( ( theme ) => ( {
22
+ title : {
23
+ marginBottom : theme . spacing ( 2 ) ,
24
+ } ,
25
+ container : {
26
+ maxWidth : "680px" ,
27
+ padding : theme . spacing ( 2 ) ,
28
+ } ,
29
+ } ) )
Original file line number Diff line number Diff line change
1
+ export * from "./CliAuthToken"
1
2
export * from "./SignInForm"
Original file line number Diff line number Diff line change 1
- import Paper from "@material-ui/core/Paper"
2
- import Typography from "@material-ui/core/Typography"
3
1
import { makeStyles } from "@material-ui/core/styles"
4
2
import React , { useEffect , useState } from "react"
5
3
import { getApiKey } from "../api"
6
- import { CodeExample } from "../components/CodeExample "
4
+ import { CliAuthToken } from "../components/SignIn "
7
5
8
6
import { FullScreenLoader } from "../components/Loader/FullScreenLoader"
9
7
import { useUser } from "../contexts/UserContext"
@@ -28,29 +26,19 @@ const CliAuthenticationPage: React.FC = () => {
28
26
29
27
return (
30
28
< div className = { styles . root } >
31
- < Paper className = { styles . container } >
32
- < Typography className = { styles . title } > Session Token</ Typography >
33
- < CodeExample code = { apiKey } />
34
- </ Paper >
29
+ < CliAuthToken sessionToken = { apiKey } />
35
30
</ div >
36
31
)
37
32
}
38
33
39
34
const useStyles = makeStyles ( ( theme ) => ( {
40
35
root : {
41
- width : "100vh " ,
42
- height : "100vw " ,
36
+ width : "100vw " ,
37
+ height : "100vh " ,
43
38
display : "flex" ,
44
39
justifyContent : "center" ,
45
40
alignItems : "center" ,
46
41
} ,
47
- title : {
48
- marginBottom : theme . spacing ( 2 ) ,
49
- } ,
50
- container : {
51
- maxWidth : "680px" ,
52
- padding : theme . spacing ( 2 ) ,
53
- } ,
54
42
} ) )
55
43
56
44
export default CliAuthenticationPage
You can’t perform that action at this time.
0 commit comments