From d5a811c60ade563ba0b1ce7309e4c407e5c93f5f Mon Sep 17 00:00:00 2001 From: Przemek Date: Thu, 11 Sep 2025 15:42:39 +0200 Subject: [PATCH 1/2] fix --- .../Course/CoursePanelLayout/FinishPage/Rate/index.tsx | 2 +- src/components/_App/Navbar/index.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Courses/Course/CoursePanelLayout/FinishPage/Rate/index.tsx b/src/components/Courses/Course/CoursePanelLayout/FinishPage/Rate/index.tsx index 2d07eb860..47b23b5fb 100644 --- a/src/components/Courses/Course/CoursePanelLayout/FinishPage/Rate/index.tsx +++ b/src/components/Courses/Course/CoursePanelLayout/FinishPage/Rate/index.tsx @@ -32,7 +32,7 @@ export const QuestionnairesModal = ({ }); const { settings } = useContext(EscolaLMSContext); const questionnaireFirstime = - settings?.value?.config[metaDataKeys.questionnaireFirstTimeMetaKey]; + settings?.value?.config?.[metaDataKeys?.questionnaireFirstTimeMetaKey]; interface StateType { show: boolean; diff --git a/src/components/_App/Navbar/index.tsx b/src/components/_App/Navbar/index.tsx index 50d37cccd..44268515b 100644 --- a/src/components/_App/Navbar/index.tsx +++ b/src/components/_App/Navbar/index.tsx @@ -291,9 +291,10 @@ const Navbar = () => { const bucket = VITE_APP_PUBLIC_IMG_BUCKET_FOLDER.replace(/^\/|\/$/g, ""); // e.g. "/wellms" // -> "wellms" // Full link, e.g. "https://randomdomain/somefolder/folder/testimg.jpg" - const url = settings.value.global.logo; + const url = settings?.value?.global?.logo; // 1. Extract pathname: "/wellms/avatars/testimg.jpg" + if (!url) return null; let relativePath = new URL(url).pathname; // 2. Remove the bucket prefix @@ -308,7 +309,7 @@ const Navbar = () => { } return relativePath; - }, [settings.value.global.logo]); + }, [settings?.value?.global?.logo]); const menuItems = [ { From 94693a7630d669a6427860f89a310469d3077f50 Mon Sep 17 00:00:00 2001 From: Przemek Wiktorski Date: Fri, 12 Sep 2025 09:11:24 +0200 Subject: [PATCH 2/2] Update @escolalms/components version to 0.0.165 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6bff7c767..4fd167c03 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@capacitor/ios": "^5.7.3", "@capacitor/local-notifications": "^5.0.7", "@capacitor/status-bar": "^5.0.7", - "@escolalms/components": "^0.0.164", + "@escolalms/components": "^0.0.165", "@escolalms/h5p-react": "^0.2.19", "@escolalms/scorm-player": "^0.0.0", "@escolalms/sdk": "^1.0.0",