#how to fix

1 messages · Page 1 of 1 (latest)

novel light
#

<AnimatedNumbers
includeComma
animateToNumber={parseInt(achievement.value)}
locale="en-US"
className="text-white text-4xl font-bold"
configs={(_: any, index: any): any => {
return {
mass: 1,
friction: 100,
tensions: 140 * (index + 1),
};
}}
/>

also, the error is: type error: Type '{ includeComma: true; animateToNumber: number; locale: string; className: string; configs: (_: any, index: any) => any; }' is not assignable to type 'IntrinsicAttributes & Props'.

"use client";
import React from "react";
import dynamic from "next/dynamic";

const AnimatedNumbers = dynamic(
() => {
return import("react-animated-numbers");
},
{ ssr: false }
);

tame badgeBOT
#

Hi @novel light. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the knowledge sources provided, it seems like you're trying to use the react-animated-numbers package with Next.js and encountering a TypeScript error. The error message suggests that the props you're passing to the AnimatedNumbers component don't match the expected types defined in the react-animated-numbers package.

Unfortunately, the knowledge sources provided don't contain specific information on how to resolve this issue with the react-animated-numbers package.

However, as a general approach, you might want to check the official documentation or TypeScript definitions of the react-animated-numbers package to ensure you're using the correct props and their types.

If you're still having trouble, you might want to consider asking for help in a relevant community forum or the GitHub repository of the react-animated-numbers package.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: