Replies: 1 comment
-
Did you find any solution for this?? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
Trying to figure out this issue actually but no luck so far.
Im using nextjs 13.4 (App router)
Swiper is working but on page load, it stretches the first slide for couple of seconds, and then loads all the other slides.
I can import the carousal dynamically with dynamic imports, but that's something i don't really want.
Is there a way to load swiper/carousal as soon as the page loads without any layout shift?
heres my code:
`
"use client";
import React from 'react';
import { Swiper, SwiperSlide } from "swiper/react";
import Data from '../../data/class';
import { Autoplay } from 'swiper';
import ClassIcons from './ClassIcons';
const SearchByClass = () => {
const dataComp = Data.map((data, index) => {
return (
<ClassIcons
{...data}
key={data.id}
class={data.title}
cars={data.cars}
icon={data.icon}
/>
);
}
);
return (
};
export default SearchByClass;
;
`
Beta Was this translation helpful? Give feedback.
All reactions