1
1
import Button from "@mui/material/Button" ;
2
- import { makeStyles } from "@mui/styles" ;
2
+ import { useTheme } from "@emotion/react" ;
3
+ import { type FC } from "react" ;
4
+ import { Link as RouterLink } from "react-router-dom" ;
3
5
import { CodeExample } from "components/CodeExample/CodeExample" ;
4
6
import { SignInLayout } from "components/SignInLayout/SignInLayout" ;
5
7
import { Welcome } from "components/Welcome/Welcome" ;
6
- import { FC } from "react" ;
7
- import { Link as RouterLink } from "react-router-dom" ;
8
8
import { FullScreenLoader } from "components/Loader/FullScreenLoader" ;
9
9
10
10
export interface CliAuthPageViewProps {
11
11
sessionToken : string | null ;
12
12
}
13
13
14
14
export const CliAuthPageView : FC < CliAuthPageViewProps > = ( { sessionToken } ) => {
15
- const styles = useStyles ( ) ;
15
+ const theme = useTheme ( ) ;
16
16
17
17
if ( ! sessionToken ) {
18
18
return < FullScreenLoader /> ;
@@ -22,45 +22,39 @@ export const CliAuthPageView: FC<CliAuthPageViewProps> = ({ sessionToken }) => {
22
22
< SignInLayout >
23
23
< Welcome message = "Session token" />
24
24
25
- < p className = { styles . text } >
25
+ < p
26
+ css = { {
27
+ fontSize : 16 ,
28
+ color : theme . palette . text . secondary ,
29
+ marginBottom : theme . spacing ( 4 ) ,
30
+ textAlign : "center" ,
31
+ lineHeight : "160%" ,
32
+ } }
33
+ >
26
34
Copy the session token below and{ " " }
27
- < strong className = { styles . lineBreak } > paste it in your terminal</ strong > .
35
+ < strong
36
+ css = { {
37
+ whiteSpace : "nowrap" ,
38
+ } }
39
+ >
40
+ paste it in your terminal
41
+ </ strong >
42
+ .
28
43
</ p >
29
44
30
45
< CodeExample code = { sessionToken } password />
31
46
32
- < div className = { styles . links } >
47
+ < div
48
+ css = { {
49
+ display : "flex" ,
50
+ justifyContent : "flex-end" ,
51
+ paddingTop : theme . spacing ( 1 ) ,
52
+ } }
53
+ >
33
54
< Button component = { RouterLink } size = "large" to = "/workspaces" fullWidth >
34
55
Go to workspaces
35
56
</ Button >
36
57
</ div >
37
58
</ SignInLayout >
38
59
) ;
39
60
} ;
40
-
41
- const useStyles = makeStyles ( ( theme ) => ( {
42
- title : {
43
- fontSize : theme . spacing ( 4 ) ,
44
- fontWeight : 400 ,
45
- lineHeight : "140%" ,
46
- margin : 0 ,
47
- } ,
48
-
49
- text : {
50
- fontSize : 16 ,
51
- color : theme . palette . text . secondary ,
52
- marginBottom : theme . spacing ( 4 ) ,
53
- textAlign : "center" ,
54
- lineHeight : "160%" ,
55
- } ,
56
-
57
- lineBreak : {
58
- whiteSpace : "nowrap" ,
59
- } ,
60
-
61
- links : {
62
- display : "flex" ,
63
- justifyContent : "flex-end" ,
64
- paddingTop : theme . spacing ( 1 ) ,
65
- } ,
66
- } ) ) ;
0 commit comments