This repository was archived by the owner on Sep 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
frontend/src/components/SessionDetail Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -54,28 +54,31 @@ const CompatSessionDetail: React.FC<Props> = ({ session }) => {
54
54
...finishedAt ,
55
55
] ;
56
56
57
- const clientName = data . ssoLogin ?. redirectUri
58
- ? simplifyUrl ( data . ssoLogin . redirectUri )
59
- : undefined ;
57
+ const clientDetails : { label : string ; value : string | JSX . Element } [ ] = [ ] ;
60
58
61
- const clientDetails = [
62
- { label : "Name" , value : clientName } ,
63
- {
59
+ if ( data . ssoLogin ?. redirectUri ) {
60
+ clientDetails . push ( {
61
+ label : "Name" ,
62
+ value : simplifyUrl ( data . ssoLogin . redirectUri ) ,
63
+ } ) ;
64
+ clientDetails . push ( {
64
65
label : "Uri" ,
65
66
value : (
66
67
< a target = "_blank" href = { data . ssoLogin ?. redirectUri } >
67
68
{ data . ssoLogin ?. redirectUri }
68
69
</ a >
69
70
) ,
70
- } ,
71
- ] ;
71
+ } ) ;
72
+ }
72
73
73
74
return (
74
75
< div >
75
76
< BlockList >
76
77
< H3 > { data . deviceId || data . id } </ H3 >
77
78
< SessionDetails title = "Session" details = { sessionDetails } />
78
- < SessionDetails title = "Client" details = { clientDetails } />
79
+ { clientDetails . length > 0 ? (
80
+ < SessionDetails title = "Client" details = { clientDetails } />
81
+ ) : null }
79
82
{ ! data . finishedAt && (
80
83
< Button
81
84
kind = "destructive"
You can’t perform that action at this time.
0 commit comments