facing 'Could not find a declaration file for module '3d-react-carousal'. issue
i tried following the solutions provided in https://stackoverflow.com/questions/41462729/typescript-react-could-not-find-a-declaration-file-for-module-react-material , but faced the same issue. Because of this , the carousel is not being displayed in my app.
add the following line at you "type.d.ts" file.
declare module "react-select-country-list";
@bdamor5 were you able to find any solution for this?
@sparshsharma2510 @bdamor5
I solved this problem by following these steps:
First I created a new component:
import { Carousel } from '3d-react-carousal';
export default function Carousel3() {
let slides = [
<img src="yourImage.jpg" alt="1" />,
<img src="yourImage.jpg" alt="2" />];
return (
<Carousel slides={slides} autoplay={true} interval={1000} arrows={false} />
)
}
Then following this answer i dynamically imported the component: https://stackoverflow.com/a/71151382
import dynamic from 'next/dynamic'
const Carousel = dynamic(
() => import('../components/Carousel/index'),
{ ssr: false }
)
...
export default function Home() {
return (
<Carousel />
)
}