Closed
Description
Good afternoon.
I can't use this library after moving the project from CRA to Next.js. I get an error that the provider cannot be imported, although it is added to _app.jsx.
Has anyone encountered a similar problem?
_app.jsx
const App = ({ Component, pageProps }) => {
return (
<ParallaxProvider>
<WagmiConfig config={wagmiConfig}>
<ScrollToTop />
<ApolloProvider client={defaultClient}>
<Provider store={store}>
<Component {...pageProps} />
</Provider>
</ApolloProvider>
</WagmiConfig>
</ParallaxProvider>
)
}
parallax component
import { useParallax } from "react-scroll-parallax";
const Bubble = ({ isLeft, className, children }) => {
const { ref } = useParallax({
rotate: isLeft ? [0, 20] : [0, -20],
translateY: [40, -40]
});
return (
<div className={className} ref={ref}>
{ children }
</div>
);
};
export default Bubble;
List of related npm package versions
"next": "^14.0.2",
"react-scroll-parallax": "^3.4.3",
Metadata
Metadata
Assignees
Labels
No labels