mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-22 10:10:07 -05:00
a3a608bf54
* fix: prettier path * chore: lint
19 lines
543 B
TypeScript
19 lines
543 B
TypeScript
import dynamic from "next/dynamic";
|
|
import { ComponentProps } from "react";
|
|
|
|
// Dynamically import the Lottie component with SSR disabled
|
|
const LottiePlayer = dynamic(
|
|
() => import("react-lottie-player").then((mod) => mod.default),
|
|
{ ssr: false },
|
|
);
|
|
|
|
export type DynamicLottieProps = ComponentProps<typeof LottiePlayer>;
|
|
|
|
// Export the dynamic component with the same props as the original
|
|
function DynamicLottie(props: DynamicLottieProps) {
|
|
return <LottiePlayer {...props} />;
|
|
}
|
|
|
|
// Using CommonJS export
|
|
export default DynamicLottie;
|