diff --git a/docs/how_tos/migrate-frontend-app.md b/docs/how_tos/migrate-frontend-app.md index 704fa32c..c6b3ec1c 100644 --- a/docs/how_tos/migrate-frontend-app.md +++ b/docs/how_tos/migrate-frontend-app.md @@ -129,7 +129,7 @@ With the exception of any custom scripts, replace the `scripts` section of your ```json "scripts": { - "dev": "PORT=YOUR_PORT openedx dev", + "dev": "PORT=YOUR_PORT PUBLIC_PATH=/YOUR_APP_NAME openedx dev", "i18n_extract": "openedx formatjs extract", "lint": "openedx lint .", "lint:fix": "openedx lint --fix .", @@ -139,6 +139,7 @@ With the exception of any custom scripts, replace the `scripts` section of your ``` - Replace `YOUR_PORT` with the desired port, of course. +- Replace `YOUR_APP_NAME` with the basename used on your site.config, not doing this will result in only the root route working. - Note that `fedx-scripts` no longer exists, and has been replaced with `openedx`. > [!TIP] @@ -356,7 +357,7 @@ Jest needs a babel.config.js file to be present in the repository. It should lo ```js const { createConfig } = require('@openedx/frontend-base/config'); -module.exports = createConfig('test'); +module.exports = createConfig('babel'); ``` diff --git a/runtime/slots/widget/iframe/hooks.ts b/runtime/slots/widget/iframe/hooks.ts index 39c63184..440fd747 100644 --- a/runtime/slots/widget/iframe/hooks.ts +++ b/runtime/slots/widget/iframe/hooks.ts @@ -127,7 +127,7 @@ export function dispatchUnmountedEvent() { */ export function useElementSize() { // Holds a reference to the ResizeObserver - const observerRef = useRef(); + const observerRef = useRef(null); const [dimensions, setDimensions] = useState({ width: 0, height: 0 }); const [offset, setOffset] = useState({ x: 0, y: 0 });