Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgr committed Feb 28, 2025
1 parent d02ba99 commit a0f334b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 13 deletions.
8 changes: 5 additions & 3 deletions htmx/sections/Deferred.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ const Deferred = (props: Props) => {
if (loading === "eager") {
return (
<>
{sections.map((section) => <section.Component {...section.props} />)}
{sections.map((section, index) => (
<section.Component key={index} {...section.props} />
))}
</>
);
}
Expand All @@ -60,8 +62,8 @@ const Deferred = (props: Props) => {
hx-swap="outerHTML"
style={{ height: "100vh" }}
/>
{props.fallbacks?.map((section) =>
section ? <section.Component {...section.props} /> : null
{props.fallbacks?.map((section, index) =>
section ? <section.Component key={index} {...section.props} /> : null
)}
</>
);
Expand Down
16 changes: 11 additions & 5 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, useScript } from "@deco/deco/hooks";
import { useDevice } from "@deco/deco/hooks";

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


/**
* @title StreamShop Carousel Video
*/
Expand Down Expand Up @@ -105,8 +104,16 @@ 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>
<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 @@ -140,7 +147,6 @@ export default function Carousel({
{/* @ts-ignore */}
</liveshop-ads-carousel>
</div>

</Section.Container>
</>
);
Expand Down
12 changes: 10 additions & 2 deletions streamshop/sections/Stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ 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>
<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 Down
1 change: 1 addition & 0 deletions utils/components/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function Dot({ index, children }: {
data-dot={index}
aria-label={`go to slider item ${index}`}
class="focus:outline-none group"
type="button"
>
{children}
</button>
Expand Down
5 changes: 4 additions & 1 deletion vtex/preview/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export function Indexing() {
name="props"
value="eyJrZXkiOiJ2dGV4L3dvcmtmbG93cy9wcm9kdWN0L2luZGV4LnRzIn0"
/>
<button style="color: white; background-color: #F71963; border-radius: 4px; padding: 4px 8px">
<button
type="submit"
style="color: white; background-color: #F71963; border-radius: 4px; padding: 4px 8px"
>
Start indexing workflow
</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion website/components/_seo/Google.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Google(
{url.hostname.replace(/^www./, "")}
</span>
<span class="text-xs font-normal leading-[18px]">
{url.protocol}//{url.hostname}{" "}
{`${url.protocol}//${url.hostname} `}
<span class="text-common ml-2 font-semibold">&#8942;</span>
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion website/pages/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface Props {
}
export function renderSection(section: Props["sections"][number]) {
if (section === undefined || section === null) {
return <></>;
return;
}
const { Component, props } = section;
return <Component {...props} />;
Expand Down

0 comments on commit a0f334b

Please sign in to comment.