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 }) => {
5454 ...finishedAt ,
5555 ] ;
5656
57- const clientName = data . ssoLogin ?. redirectUri
58- ? simplifyUrl ( data . ssoLogin . redirectUri )
59- : undefined ;
57+ const clientDetails : { label : string ; value : string | JSX . Element } [ ] = [ ] ;
6058
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 ( {
6465 label : "Uri" ,
6566 value : (
6667 < a target = "_blank" href = { data . ssoLogin ?. redirectUri } >
6768 { data . ssoLogin ?. redirectUri }
6869 </ a >
6970 ) ,
70- } ,
71- ] ;
71+ } ) ;
72+ }
7273
7374 return (
7475 < div >
7576 < BlockList >
7677 < H3 > { data . deviceId || data . id } </ H3 >
7778 < SessionDetails title = "Session" details = { sessionDetails } />
78- < SessionDetails title = "Client" details = { clientDetails } />
79+ { clientDetails . length > 0 ? (
80+ < SessionDetails title = "Client" details = { clientDetails } />
81+ ) : null }
7982 { ! data . finishedAt && (
8083 < Button
8184 kind = "destructive"
You can’t perform that action at this time.
0 commit comments