11import { MEDIA_QUERY_MAX_WIDTH , USER_SETTINGS_BASENAME } from 'app-shared/constants' ;
22import type { Org } from 'app-shared/types/OrgList' ;
3- import type { StudioProfileMenuGroup } from '@studio/components-legacy ' ;
4- import { StudioPageHeader , useMediaQuery } from '@studio/components-legacy ' ;
5- import { StudioAvatar } from '@studio/components ' ;
3+ import type { StudioProfileMenuGroup } from '@studio/components' ;
4+ import { StudioPageHeader , StudioAvatar } from '@studio/components' ;
5+ import { useMediaQuery } from '@studio/hooks ' ;
66import type { ReactElement } from 'react' ;
77import { useTranslation } from 'react-i18next' ;
88import type { User } from 'app-shared/types/Repository' ;
@@ -20,18 +20,20 @@ export const PageHeader = (): ReactElement => {
2020 const { i18n } = useTranslation ( ) ;
2121
2222 return (
23- < StudioPageHeader >
24- < StudioPageHeader . Main >
25- < StudioPageHeader . Left
26- showTitle = { shouldDisplayDesktopMenu }
27- title = { org . name [ i18n . language ] }
28- />
29- { shouldDisplayDesktopMenu && < CenterContent /> }
30- < StudioPageHeader . Right >
31- < ProfileMenu org = { org } user = { user } />
32- </ StudioPageHeader . Right >
33- </ StudioPageHeader . Main >
34- </ StudioPageHeader >
23+ < div data-color-scheme = 'dark' >
24+ < StudioPageHeader >
25+ < StudioPageHeader . Main >
26+ < StudioPageHeader . Left
27+ showTitle = { shouldDisplayDesktopMenu }
28+ title = { org . name [ i18n . language ] }
29+ />
30+ { shouldDisplayDesktopMenu && < CenterContent /> }
31+ < StudioPageHeader . Right >
32+ < ProfileMenu org = { org } user = { user } />
33+ </ StudioPageHeader . Right >
34+ </ StudioPageHeader . Main >
35+ </ StudioPageHeader >
36+ </ div >
3537 ) ;
3638} ;
3739
@@ -42,26 +44,20 @@ const CenterContent = (): ReactElement => {
4244 return (
4345 < StudioPageHeader . Center >
4446 < StudioPageHeader . HeaderLink
45- color = 'dark'
46- variant = 'regular'
4747 renderLink = { ( props ) => (
4848 < a href = { `/dashboard/app-dashboard/${ org } ` } { ...props } >
4949 < span > { t ( 'dashboard.header_item_dashboard' ) } </ span >
5050 </ a >
5151 ) }
5252 />
5353 < StudioPageHeader . HeaderLink
54- color = 'dark'
55- variant = 'regular'
5654 renderLink = { ( props ) => (
57- < NavLink to = { `/${ org } /apps` } { ...props } >
55+ < NavLink data-color = 'dark' to = { `/${ org } /apps` } { ...props } >
5856 < span className = { classes . active } > { t ( 'admin.apps.title' ) } </ span >
5957 </ NavLink >
6058 ) }
6159 />
6260 < StudioPageHeader . HeaderLink
63- color = 'dark'
64- variant = 'regular'
6561 isBeta = { true }
6662 renderLink = { ( props ) => (
6763 < a href = { `/dashboard/org-library/${ org } ` } { ...props } >
@@ -118,16 +114,13 @@ const ProfileMenu = ({ user, org }: ProfileMenuProps): ReactElement => {
118114 < StudioPageHeader . ProfileMenu
119115 profileMenuGroups = { profileMenuGroups }
120116 triggerButtonText = { userNameAndOrg }
121- ariaLabelTriggerButton = { userNameAndOrg }
122117 profileImage = {
123118 < StudioAvatar
124119 src = { user ?. avatar_url }
125120 alt = { t ( 'general.profile_icon' ) }
126121 title = { t ( 'shared.header_profile_icon_text' ) }
127122 />
128123 }
129- color = 'dark'
130- variant = { 'regular' }
131124 />
132125 ) ;
133126} ;
0 commit comments