1- import { useOrganization , useUser } from '@clerk/shared/react/index' ;
1+ import { useOrganization } from '@clerk/shared/react/index' ;
22import React from 'react' ;
33
44import { useEnvironment } from '@/contexts' ;
5- import { Box , Col , Flex , Hr , Icon , localizationKeys , Text , useAppearance } from '@/customizables' ;
5+ import { Box , Col , Flex , Heading , Icon , localizationKeys , Text , useAppearance } from '@/customizables' ;
66import { ApplicationLogo } from '@/elements/ApplicationLogo' ;
77import { NavBar , NavbarContextProvider } from '@/elements/Navbar' ;
88import { BoxIcon } from '@/icons' ;
@@ -23,61 +23,61 @@ export const ConfigureSSONavbar = ({ children, contentRef }: ConfigureSSONavbarP
2323 return (
2424 < NavbarContextProvider contentRef = { contentRef } >
2525 < NavBar
26+ contentRef = { contentRef }
2627 header = {
27- < Flex
28- align = 'center'
29- sx = { t => ( {
30- gap : t . space . $2 ,
31- padding : `${ t . space . $none } ${ t . space . $3 } ` ,
32- maxWidth : '100%' ,
33- } ) }
34- >
35- { hasLogo ? (
36- < ApplicationLogo
37- sx = { t => ( { width : t . space . $9 , height : t . space . $9 , borderRadius : t . radii . $md , overflow : 'hidden' } ) }
38- />
39- ) : (
40- < Box
41- sx = { t => ( {
42- width : t . space . $9 ,
43- height : t . space . $9 ,
44- flexShrink : 0 ,
45- borderRadius : t . radii . $md ,
46- backgroundColor : t . colors . $primary500 ,
47- color : t . colors . $colorPrimaryForeground ,
48- display : 'flex' ,
49- alignItems : 'center' ,
50- justifyContent : 'center' ,
51- } ) }
52- aria-hidden
53- >
54- < Icon
55- icon = { BoxIcon }
56- sx = { t => ( { width : t . sizes . $4 , height : t . sizes . $4 } ) }
28+ < Col sx = { t => ( { gap : t . space . $6 } ) } >
29+ < Flex
30+ align = 'center'
31+ sx = { t => ( {
32+ gap : t . space . $2 ,
33+ padding : `${ t . space . $none } ${ t . space . $3 } ` ,
34+ maxWidth : '100%' ,
35+ } ) }
36+ >
37+ { hasLogo ? (
38+ < ApplicationLogo
39+ sx = { t => ( { width : t . space . $9 , height : t . space . $9 , borderRadius : t . radii . $md , overflow : 'hidden' } ) }
5740 />
58- </ Box >
59- ) }
41+ ) : (
42+ < Box
43+ sx = { t => ( {
44+ width : t . space . $9 ,
45+ height : t . space . $9 ,
46+ flexShrink : 0 ,
47+ borderRadius : t . radii . $md ,
48+ backgroundColor : t . colors . $primary500 ,
49+ color : t . colors . $colorPrimaryForeground ,
50+ display : 'flex' ,
51+ alignItems : 'center' ,
52+ justifyContent : 'center' ,
53+ } ) }
54+ aria-hidden
55+ >
56+ < Icon
57+ icon = { BoxIcon }
58+ sx = { t => ( { width : t . sizes . $4 , height : t . sizes . $4 } ) }
59+ />
60+ </ Box >
61+ ) }
62+
63+ < Col sx = { { minWidth : 0 } } >
64+ < Text
65+ as = 'p'
66+ truncate
67+ >
68+ { applicationName }
69+ </ Text >
70+ { organizationSettings . enabled && < OrganizationSidebarSubtitle /> }
71+ </ Col >
72+ </ Flex >
6073
61- < Col sx = { { minWidth : 0 } } >
62- < Text
63- as = 'p'
64- truncate
65- >
66- { applicationName }
67- </ Text >
68- { organizationSettings . enabled && < OrganizationSidebarSubtitle /> }
69- </ Col >
70- </ Flex >
74+ < Heading
75+ as = 'h1'
76+ localizationKey = { localizationKeys ( 'configureSSO.navbar.title' ) }
77+ sx = { t => ( { fontSize : t . fontSizes . $lg , padding : `${ t . space . $none } ${ t . space . $3 } ` } ) }
78+ />
79+ </ Col >
7180 }
72- titleSx = { t => ( { fontSize : t . fontSizes . $lg } ) }
73- containerSx = { {
74- flexDirection : 'column-reverse' ,
75- flex : 0 ,
76- } }
77- title = { localizationKeys ( 'configureSSO.navbar.title' ) }
78- routes = { [ ] }
79- contentRef = { contentRef }
80- footer = { < PrimaryEmailDomainFooter /> }
8181 />
8282 { children }
8383 </ NavbarContextProvider >
@@ -101,31 +101,3 @@ const OrganizationSidebarSubtitle = (): JSX.Element | null => {
101101 </ Text >
102102 ) ;
103103} ;
104-
105- const PrimaryEmailDomainFooter = ( ) : JSX . Element | null => {
106- const { user } = useUser ( ) ;
107- const emailDomain = user ?. primaryEmailAddress ?. emailAddress . split ( '@' ) [ 1 ] ;
108-
109- if ( ! emailDomain ) {
110- return null ;
111- }
112-
113- return (
114- < Col
115- sx = { t => ( {
116- gap : t . space . $6 ,
117- padding : `${ t . space . $none } ${ t . space . $3 } ` ,
118- } ) }
119- >
120- < Hr sx = { t => ( { backgroundColor : t . colors . $borderAlpha100 } ) } />
121-
122- < Text
123- as = 'span'
124- truncate
125- sx = { { textDecoration : 'underline' } }
126- >
127- { emailDomain }
128- </ Text >
129- </ Col >
130- ) ;
131- } ;
0 commit comments