Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion client-app/pages/matcher/builderIo/builder-io.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { useElementVisibility } from "@vueuse/core";
import { computed, onMounted, ref, shallowRef } from "vue";
import { onBeforeRouteUpdate } from "vue-router";
import { usePageTitle } from "@/core/composables";
import { useLanguages } from "@/core/composables/useLanguages";
import { globals } from "@/core/globals";
import { useUser } from "@/shared/account";
import { builderIOComponents } from "./customComponents";
import type { StateType, UpdateStateEventArgs } from "@/pages/matcher/priorityManager";
import type { BuilderContent } from "@builder.io/sdk-vue";
Expand All @@ -31,6 +34,10 @@ const props = defineProps<IProps>();
const canShowContent = ref(false);
const content = ref<BuilderContent | null>(null);
const isLoading = ref(false);
const { storeId, cultureName: currentCultureName, organizationId } = globals;
const { isAuthenticated } = useUser();

const { getUrlWithoutLocale } = useLanguages();

function clearState() {
content.value = null;
Expand All @@ -55,12 +62,20 @@ async function tryLoadContent(urlPath: string) {

emitState("loading");

const url = getUrlWithoutLocale(urlPath);

content.value = await fetchOneEntry({
model: "page",
apiKey: props.apiKey,
options: getBuilderSearchParams(new URLSearchParams(location.search)),
userAttributes: {
urlPath,
urlPath: url,
/* other attributes */
locale: currentCultureName,
organizationId,
isAuthenticated: isAuthenticated.value,
storeId: storeId,
// groupName: "", // we don't have groups yet
},
});

Expand Down
1 change: 1 addition & 0 deletions client-app/pages/static-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{{ template.settings.header }}
</VcTypography>
</div>

<template v-for="item in template.content">
<!-- @deprecated. TODO Keep only v-bind="item". Remove settings and model from all components -->
<component
Expand Down