Skip to content

Commit 0e1dcc6

Browse files
cdxkerskeptrunedev
authored andcommitted
feature: load css from component instead of as a link tag
1 parent 9172def commit 0e1dcc6

3 files changed

Lines changed: 3 additions & 15 deletions

File tree

clients/trieve-shopify-extension/extensions/global-search/blocks/global_component.liquid

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<link
2-
rel="stylesheet"
3-
href="https://cdn.trieve.ai/beta/search-component/index.css"
4-
>
5-
61
<script type="module">
72
import {renderToDiv} from 'https://cdn.trieve.ai/beta/search-component/vanilla/index.js';
83
import {addToCart, checkCartQuantity} from '{{'cart-manager.js' | asset_url}}';
@@ -33,6 +28,7 @@
3328
renderToDiv(root, {
3429
type: "ecommerce",
3530
baseUrl: "https://api.trieve.ai",
31+
cssRelease: "beta",
3632
useGroupSearch: true,
3733
scaleRem: true,
3834
hideOpenButton: true,

clients/trieve-shopify-extension/extensions/global-search/blocks/inline_component.liquid

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<link
2-
rel="stylesheet"
3-
href="https://cdn.trieve.ai/beta/search-component/index.css"
4-
>
5-
61
<div class="trieve-inline-root"></div>
72

83
<script type="module">
@@ -38,6 +33,7 @@
3833
renderToDiv(inlineRoot, {
3934
type: "ecommerce",
4035
baseUrl: "https://api.trieve.ai",
36+
cssRelease: "beta,
4137
useGroupSearch: true,
4238
scaleRem: true,
4339
hideOpenButton: true,

clients/trieve-shopify-extension/extensions/global-search/blocks/similar_products.liquid

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<link
2-
rel="stylesheet"
3-
href="https://unpkg.com/trieve-search-component@0.4.24/dist/index.css"
4-
/>
5-
61
<div class="trieve-recommendations">
72
</div>
83

@@ -52,6 +47,7 @@
5247
if (shouldShow) {
5348
renderRecommendationsToDiv(inlineRoot, {
5449
apiKey: getValue("{{ app.metafields.trieve.api_key }}", ""),
50+
cssRelease: "beta",
5551
datasetId: getValue("{{ app.metafields.trieve.dataset_id }}", ""),
5652
baseUrl: getValue("{{ block.settings.base_url }}", "https://api.trieve.ai"),
5753
productId: getValue("{{ product.id }}", ""),

0 commit comments

Comments
 (0)