Skip to content

Commit

Permalink
🐛 Fix Lottie with node 22
Browse files Browse the repository at this point in the history
  • Loading branch information
srod committed Sep 27, 2024
1 parent cff47ed commit 2c10d6e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
"use client";

import { useWalletStatus } from "@frak-labs/nexus-sdk/react";
import { Player } from "@lottiefiles/react-lottie-player";
import { Link } from "next-view-transitions";
import dynamic from "next/dynamic";
import { useState } from "react";
import lottie from "./assets/lottie.json";
import styles from "./index.module.css";

/**
* Import Lottie component dynamically to avoid loading it on the server side
*/
const Player = dynamic(() =>
import("@lottiefiles/react-lottie-player").then((mod) => mod.Player)
);

export function Lottie({ className }: { className?: string }) {
const [playerState, setPlayerState] = useState<"complete" | undefined>();
// Get the wallet status
Expand Down

0 comments on commit 2c10d6e

Please sign in to comment.