From 7c5c518d9da60eb31a2099bec402cefee43b875b Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 15 Oct 2024 00:16:25 -0400 Subject: [PATCH 1/2] refactor: switch Content Library XBlock preview to Studio edx-platform commit 7316111 (PR #35598) moved the XBlock embed view so that it can be rendered on either LMS or Studio. This commit moves the frontend to actually call the Studio endpoint. This will make Content Library static asset display easier, because that view will only be made available through Studio and not the LMS. --- src/library-authoring/LibraryBlock/LibraryBlock.tsx | 4 ++-- .../component-info/ComponentPreview.test.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/library-authoring/LibraryBlock/LibraryBlock.tsx b/src/library-authoring/LibraryBlock/LibraryBlock.tsx index 87defc0d83..dd49206123 100644 --- a/src/library-authoring/LibraryBlock/LibraryBlock.tsx +++ b/src/library-authoring/LibraryBlock/LibraryBlock.tsx @@ -20,7 +20,7 @@ interface LibraryBlockProps { const LibraryBlock = ({ onBlockNotification, usageKey }: LibraryBlockProps) => { const iframeRef = useRef(null); const [iFrameHeight, setIFrameHeight] = useState(600); - const lmsBaseUrl = getConfig().LMS_BASE_URL; + const studioBaseUrl = getConfig().STUDIO_BASE_URL; const intl = useIntl(); @@ -74,7 +74,7 @@ const LibraryBlock = ({ onBlockNotification, usageKey }: LibraryBlockProps) => {