So, I tried this change:
import { SlotOperation } from '@openedx/frontend-base';
-import { exampleHeaderApp } from './widgets/ExampleHeader';
+//import { exampleHeaderApp } from './widgets/ExampleHeader';
+import { learnerDashboardHeaderApp } from '@openedx/frontend-app-learner-dashboard';
const slots: SlotOperation[] = [
- ...(exampleHeaderApp.slots ?? []),
+ ...(learnerDashboardHeaderApp.slots as []),
];
but it fails with
3.612 @calculquebec/frontend-static-pages:build: src/slots.tsx(4,10): error TS2724: '"@openedx/frontend-app-learner-dashboard"' has no exported member named 'learnerDashboardHeaderApp'. Did you mean 'learnerDashboardApp'?
3.644 @calculquebec/frontend-static-pages:build: make: *** [Makefile:52: build] Error 2
3.650 @calculquebec/frontend-static-pages:build: npm error Lifecycle script `build` failed with error:
3.650 @calculquebec/frontend-static-pages:build: npm error code 2
3.650 @calculquebec/frontend-static-pages:build: npm error path /openedx/site/packages/frontend-app-static-pages
3.650 @calculquebec/frontend-static-pages:build: npm error workspace @calculquebec/frontend-static-pages@0.0.0-dev
3.651 @calculquebec/frontend-static-pages:build: npm error location /openedx/site/packages/frontend-app-static-pages
3.651 @calculquebec/frontend-static-pages:build: npm error command failed
3.651 @calculquebec/frontend-static-pages:build: npm error command sh -c make build
3.685 @openedx/frontend-app-authn:build: make: *** [Makefile:39: build] Interrupt
I then try to import from @openedx/frontend-app-learner-dashboard/widgets/LearnerDashboardHeader, but I got
3.464 @calculquebec/frontend-static-pages:build: src/slots.tsx(4,43): error TS2307: Cannot find module '@openedx/frontend-app-learner-dashboard/widgets/LearnerDashboardHeader' or its corresponding type declarations.
3.494 @calculquebec/frontend-static-pages:build: make: *** [Makefile:52: build] Error 2
3.503 @calculquebec/frontend-static-pages:build: npm error Lifecycle script `build` failed with error:
3.503 @calculquebec/frontend-static-pages:build: npm error code 2
3.504 @calculquebec/frontend-static-pages:build: npm error path /openedx/site/packages/frontend-app-static-pages
3.504 @calculquebec/frontend-static-pages:build: npm error workspace @calculquebec/frontend-static-pages@0.0.0-dev
3.504 @calculquebec/frontend-static-pages:build: npm error location /openedx/site/packages/frontend-app-static-pages
3.504 @calculquebec/frontend-static-pages:build: npm error command failed
Does that mean the actual header is not exported ?