Math.min(1" /> Math.min(1" /> Math.min(1"/>

Nextjs Smooth Scrolling

85 views Asked by At

import { ReactLenis } from "@studio-freight/react-lenis";

function SmoothScrolling({ children }) {
  return (
    <ReactLenis root easing={(t) => Math.min(1, 1.001 - Math.pow(2, -10 * t))}>
      {children}
    </ReactLenis>
  );
}

export default SmoothScrolling;




import {SmoothScrolling} from '@/components/SmoothScrolling'
import '@/styles/globals.css'

export default function App({ Component, pageProps }) {
  return(
    <SmoothScrolling>
       <Component {...pageProps} />
    </SmoothScrolling>
  )
}

./node_modules/@studio-freight/react-lenis/dist/react-lenis.modern.mjs:1:0 Module not found: Default condition should be last one Import trace for requested module: ./src/components/SmoothScrolling.jsx ./src/pages/_app.js

What's causing this error

0

There are 0 answers