How can I use lottiefiles in loading page in nextjs Project

How can I use lottie in nextjs project (App Structure) for loading project to load an animated logo
— I tried to add "use client"; but no thing happens and tried import Lottie from react-lottie as a dynamic import but the same problem happens no animation on screen but if I change any value of the component after it’s mounted it shows the animation