Skip to content

Commit

Permalink
Add missing base-path to embed url when required
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sánchez García <[email protected]>
  • Loading branch information
cynthia-sg committed Oct 31, 2024
1 parent 4330641 commit fcb8c39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/webapp/src/layout/navigation/EmbedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { batch, createEffect, createMemo, createSignal, For, on, onMount, Show }

import {
Alignment,
BASE_PATH_PARAM,
DEFAULT_DISPLAY_CATEGORY_HEADER,
DEFAULT_DISPLAY_CATEGORY_IN_SUBCATEGORY,
DEFAULT_DISPLAY_HEADER,
Expand Down Expand Up @@ -136,6 +137,11 @@ const EmbedModal = () => {
const getIFrameUrl = () => {
const embedUrl = new URL(`${embedOrigin()}/embed.html`);
const embedParams = new URLSearchParams();

if (!isUndefined(BASE_PATH)) {
embedParams.append(BASE_PATH_PARAM, BASE_PATH);
}

embedParams.append(KEY_PARAM, key() || categoriesList()[0].normalized_name);
embedParams.append(DISPLAY_HEADER_PARAM, displayHeader() ? 'true' : 'false');
embedParams.append(DISPLAY_HEADER_CATEGORY_PARAM, displayCategoryTitle() ? 'true' : 'false');
Expand Down

0 comments on commit fcb8c39

Please sign in to comment.