Skip to content

Commit

Permalink
fix: update streamshop sdk (#1028)
Browse files Browse the repository at this point in the history
Co-authored-by: ryansantos <ryan.ribeiro@cadastra.com>
  • Loading branch information
RyanSantosRibeiro and ryansantosmz authored Feb 28, 2025
1 parent 38925b6 commit e1ea35a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 32 deletions.
23 changes: 6 additions & 17 deletions streamshop/sections/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Section, {
Props as SectionHeaderProps,
} from "../components/ui/StreamshopSection.tsx";
import { type LoadingFallbackProps } from "@deco/deco";
import { useDevice } from "@deco/deco/hooks";
import { useDevice, useScript } from "@deco/deco/hooks";

Check failure on line 6 in streamshop/sections/Carousel.tsx

View workflow job for this annotation

GitHub Actions / Bundle & Check Apps (ubuntu-latest)

`useScript` is never used

interface StyleDesktop {
/**
Expand Down Expand Up @@ -68,6 +68,7 @@ interface Props extends SectionHeaderProps {
style: Style;
}


/**
* @title StreamShop Carousel Video
*/
Expand Down Expand Up @@ -104,6 +105,8 @@ export default function Carousel({
: style.styleMobile;
return (
<>
<script async src="https://assets.streamshop.com.br/sdk-ads/liveshop-ads-video.min.js" ></script>
<script async src="https://assets.streamshop.com.br/sdk-ads/liveshop-ads-carousel.min.js" ></script>
<Section.Container
class={clx(
style?.containerWidth == "full" && "w-full !max-w-full",
Expand Down Expand Up @@ -132,26 +135,12 @@ export default function Carousel({
: style?.radius == "pílula"
? "500px"
: "5px"}
slugs-video={slugs.join(",")}
slugs-video={`${slugs.join(",")}`}
>
{/* @ts-ignore */}
</liveshop-ads-carousel>
</div>
<script
async
src="https://assets.streamshop.com.br/sdk-ads/liveshop-ads-video.min.js"
>
</script>
<script
async
src="https://assets.streamshop.com.br/sdk-ads/liveshop-ads-carousel.min.js"
>
</script>
<script
async
src="https://assets.streamshop.com.br/sdk/liveshop-web-sdk.min.js"
>
</script>

</Section.Container>
</>
);
Expand Down
17 changes: 2 additions & 15 deletions streamshop/sections/Stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export default function Stories({
}: Props) {
return (
<>
<script async src="https://assets.streamshop.com.br/sdk-ads/liveshop-ads-video.min.js" ></script>
<script async src="https://assets.streamshop.com.br/sdk-ads/liveshop-ads-carousel.min.js" ></script>
<Section.Container>
<Section.Header title={title} cta={cta} />

Expand All @@ -52,21 +54,6 @@ export default function Stories({
</liveshop-ads-carousel>
</div>
</Section.Container>
<script
async
src="https://assets.streamshop.com.br/sdk-ads/liveshop-ads-video.min.js"
>
</script>
<script
async
src="https://assets.streamshop.com.br/sdk-ads/liveshop-ads-carousel.min.js"
>
</script>
<script
async
src="https://assets.streamshop.com.br/sdk/liveshop-web-sdk.min.js"
>
</script>
</>
);
}
Expand Down

0 comments on commit e1ea35a

Please sign in to comment.