Skip to content

Commit

Permalink
cleanup: fix inlineChat uses demo page productQuestions fix image
Browse files Browse the repository at this point in the history
recomendations
  • Loading branch information
cdxker committed Jan 10, 2025
1 parent 997ea63 commit b792cda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions server/src/public/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,14 @@

if (params.inline) {
const inlineRoot = document.querySelector("#inline-root");
params.groupTrackingId = params.singleProductOptions.groupTrackingId;
params.cleanGroupName = params.singleProductOptions.productName;
const inlineParams = params;
inlineParams.groupTrackingId = params.singleProductOptions.groupTrackingId;
inlineParams.cleanGroupName = params.singleProductOptions.productName;

if (params.singleProductOptions && params.singleProductOptions.productQuestions) {
inlineParams.defaultAiQuestions = params.singleProductOptions.productQuestions;
}

renderToDiv(inlineRoot, {
...params,
})
Expand Down
4 changes: 2 additions & 2 deletions server/src/public/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ <h4 class="text-sm text-gray-500 mt-2 w-fit">
chunkElement.setAttribute("x-group-tracking-id", groupTrackingId);
chunkElement.innerHTML = `
<div
class="h-72 w-full overflow-hidden rounded-lg"
class="w-full overflow-hidden rounded-lg"
>
<img
src="${imageUrl}"
alt="${title}"
class="rec-image size-full object-cover"
class="rec-image w-full object-cover"
/>
</div>
<div class="mt-4">
Expand Down

0 comments on commit b792cda

Please sign in to comment.