mentalrob
mentalrob
NNuxt
Created by mentalrob on 1/20/2025 in #❓・help
I need a 0 CLS slider for nuxt
Hi, I'm working on a e-commerce website and i need a slider for hero images. I'm currently trying to use @splidejs/vue but its resulting a bad CLS score. I also tested out with nuxt-splide, same thing happens. Can anyone help me about this ? If you encounter such an issue please let me know
9 replies
NNuxt
Created by mentalrob on 1/9/2025 in #❓・help
<no response> fetch failed error on sending request to strapi via $fetch
Hello, i'm trying to implement a simple cms for my nuxt project. But the problem is when i use $fetch to send request to my strapi endpoint $fetch throws this error:
"http://localhost:1337/api/blog-posts": <no response> fetch failed
"http://localhost:1337/api/blog-posts": <no response> fetch failed
Here is the code i'm trying:
<template>
<div class="container mx-auto px-4 py-8">
<h1 class="text-3xl font-bold mb-8">Blog Posts</h1>

<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">

</div>
</div>
</template>

<script setup>
const res = await $fetch(`http://localhost:1337/api/blog-posts`) // $fetch fails here.
console.log(res)

</script>
<template>
<div class="container mx-auto px-4 py-8">
<h1 class="text-3xl font-bold mb-8">Blog Posts</h1>

<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">

</div>
</div>
</template>

<script setup>
const res = await $fetch(`http://localhost:1337/api/blog-posts`) // $fetch fails here.
console.log(res)

</script>
strapi is freshly installed with pnpm dlx create-strapi-app@latest its strapi 5.
9 replies