@@ -21,16 +21,16 @@ function useDynamicHookShim() {
2121
2222 async function load ( ) {
2323 try {
24- const module = await import ( "@edx/frontend-plugin-notifications" ) ;
24+ // eslint-disable-next-line import/no-extraneous-dependencies
25+ const module = await import ( '@edx/frontend-plugin-notifications' ) ;
2526 const hookFn = module . useAppNotifications ?? module . default ;
2627 if ( ! cancelled ) {
2728 // `module.useAppNotifications` is itself a hook
2829 setHook ( ( ) => hookFn ) ;
2930 }
3031 } catch ( err : any ) {
31- // If the module cannot be found, just keep `hook` as null.
32- console . error ( "Failed to load notifications plugin:" , err ) ;
33- // No hook – the UI will fall back to the placeholder.
32+ // eslint-disable-next-line no-console
33+ console . error ( 'Failed to load notifications plugin:' , err ) ;
3434 }
3535 }
3636
@@ -45,7 +45,7 @@ function useDynamicHookShim() {
4545}
4646
4747// Component that actually calls the loaded hook
48- function NotificationHookConsumer ( { hook } : { hook : ( ) => HooKType } ) {
48+ const NotificationHookConsumer = ( { hook } : { hook : ( ) => HooKType } ) => {
4949 // The hook is now called on **every** render of this component
5050 const { notificationAppData } = hook ( ) ;
5151
@@ -63,7 +63,7 @@ function NotificationHookConsumer({ hook }: { hook: () => HooKType }) {
6363 />
6464 </ small >
6565 ) ;
66- }
66+ } ;
6767
6868// Main component
6969export const NotificationStatusIcon = ( ) => {
@@ -76,4 +76,3 @@ export const NotificationStatusIcon = () => {
7676 // Once loaded, delegate to a component that calls the hook
7777 return < NotificationHookConsumer hook = { loadedHook } /> ;
7878} ;
79-
0 commit comments