Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint and checks #1029

Merged
merged 3 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
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/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const Image = forwardRef<HTMLImageElement, Props>((props, ref) => {
)}
<img
{...props}
data-fresh-disable-lock={true}
data-fresh-disable-lock
preload={undefined}
src={props.src}
srcSet={srcSet}
Expand Down
2 changes: 1 addition & 1 deletion website/components/Picture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const Source = forwardRef<HTMLSourceElement, SourceProps>(
)}
<source
{...props}
data-fresh-disable-lock={true}
data-fresh-disable-lock
preload={undefined}
src={undefined} // Avoid deprecated api lighthouse warning
srcSet={srcSet}
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 <div></div>;
}
const { Component, props } = section;
return <Component {...props} />;
Expand Down
4 changes: 3 additions & 1 deletion website/sections/Rendering/Deferred.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ const Deferred = (props: Props) => {
if (display) {
return (
<>
{sections.map(({ Component, props }) => <Component {...props} />)}
{sections.map(({ Component, props }, index) => (
<Component key={index} {...props} />
))}
</>
);
}
Expand Down
Loading