Based on the error you're seeing in VS Code, it appears there might be a small syntax issue in your code. The error "," expected on the % operator suggests that there might be a problem with how the map function is structured.
Let's try to adjust the code slightly to resolve this error:
<section class="mt-16 grid grid-cols-1">
{services.map(({ title, text }, index) =>
index % 2 === 0 ? (
<div class:list={`${backgrounds[index/2].classes} container flex py-16`} style={`background-image: url(${backgrounds[index/2].background.src});`}></div>
) : (
<div class="container flex py-8"></div>
)
)}
</section>
The main change here is removing the extra set of curly braces {} around the ternary operator. In Astro, when you're using map(), you don't need an additional set of curly braces for the content inside the map function.
If you're still experiencing issues, it might be helpful to check your TypeScript configuration. According to the Astro TypeScript documentation (https://docs.astro.build/en/guides/typescript/#troubleshooting), sometimes issues can arise when using multiple JSX frameworks in the same project. If this is the case, you might need to adjust your tsconfig.json file or use pragma comments.
If the error persists, you might want to consider creating a minimal reproduction (https://docs.astro.build/en/guides/troubleshooting/#creating-minimal-reproductions) of the issue to get more specific help from the Astro community or support channels.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: