@@ -7,8 +7,8 @@ import { ProjectObjectType, typedEmptyImage } from '~/shared/components/design/u
77import { ModelRegistryContextProvider } from '~/app/context/ModelRegistryContext' ;
88import TitleWithIcon from '~/shared/components/design/TitleWithIcon' ;
99import WhosMyAdministrator from '~/shared/components/WhosMyAdministrator' ;
10- import { isMUITheme } from '~/shared/utilities/const' ;
1110import KubeflowDocs from '~/shared/components/KubeflowDocs' ;
11+ import { useThemeContext } from '~/app/ThemeContext' ;
1212import EmptyModelRegistryState from './screens/components/EmptyModelRegistryState' ;
1313import InvalidModelRegistry from './screens/InvalidModelRegistry' ;
1414import ModelRegistrySelectorNavigator from './screens/ModelRegistrySelectorNavigator' ;
@@ -36,6 +36,7 @@ const ModelRegistryCoreLoader: React.FC<ModelRegistryCoreLoaderProps> = ({
3636 preferredModelRegistry,
3737 updatePreferredModelRegistry,
3838 } = React . useContext ( ModelRegistrySelectorContext ) ;
39+ const { isMUITheme } = useThemeContext ( ) ;
3940
4041 const modelRegistryFromRoute = modelRegistries . find ( ( mr ) => mr . name === modelRegistry ) ;
4142
@@ -65,16 +66,16 @@ const ModelRegistryCoreLoader: React.FC<ModelRegistryCoreLoaderProps> = ({
6566 emptyStatePage : (
6667 < EmptyModelRegistryState
6768 testid = "empty-model-registries-state"
68- title = { isMUITheme ( ) ? 'Deploy a model registry' : 'Request access to model registries' }
69+ title = { isMUITheme ? 'Deploy a model registry' : 'Request access to model registries' }
6970 description = {
70- isMUITheme ( )
71+ isMUITheme
7172 ? 'To deploy a new model registry, follow the instructions in the docs below.'
7273 : 'To request a new model registry, or to request permission to access an existing model registry, contact your administrator.'
7374 }
7475 headerIcon = { ( ) => (
7576 < img src = { typedEmptyImage ( ProjectObjectType . registeredModels ) } alt = "" />
7677 ) }
77- customAction = { isMUITheme ( ) ? < KubeflowDocs /> : < WhosMyAdministrator /> }
78+ customAction = { isMUITheme ? < KubeflowDocs /> : < WhosMyAdministrator /> }
7879 />
7980 ) ,
8081 headerContent : null ,
@@ -103,14 +104,14 @@ const ModelRegistryCoreLoader: React.FC<ModelRegistryCoreLoaderProps> = ({
103104 return (
104105 < ApplicationsPage
105106 title = {
106- ! isMUITheme ( ) ? (
107+ ! isMUITheme ? (
107108 < TitleWithIcon title = "Model Registry" objectType = { ProjectObjectType . registeredModels } />
108109 ) : (
109110 'Model Registry'
110111 )
111112 }
112113 description = {
113- ! isMUITheme ( ) ? (
114+ ! isMUITheme ? (
114115 'Select a model registry to view and manage your registered models. Model registries provide a structured and organized way to store, share, version, deploy, and track models.'
115116 ) : (
116117 < Divider />
0 commit comments