fix: prevent lottie from ssr
This commit is contained in:
@@ -9,7 +9,7 @@ const config = {
|
|||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
|
|
||||||
/** Enables hot reloading for local packages without a build step */
|
/** Enables hot reloading for local packages without a build step */
|
||||||
transpilePackages: ["@kan/api", "@kan/db"],
|
transpilePackages: ["@kan/api", "@kan/db", "@kan/utils"],
|
||||||
|
|
||||||
/** We already do linting and typechecking as separate tasks in CI */
|
/** We already do linting and typechecking as separate tasks in CI */
|
||||||
eslint: { ignoreDuringBuilds: true },
|
eslint: { ignoreDuringBuilds: true },
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import Lottie from "react-lottie-player";
|
import dynamic from "next/dynamic";
|
||||||
|
|
||||||
|
const Lottie = dynamic(() => import("react-lottie-player"), { ssr: false });
|
||||||
|
|
||||||
type IconProps = {
|
type IconProps = {
|
||||||
isPlaying: boolean;
|
isPlaying: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user