diff --git a/parfum-shop/package-lock.json b/parfum-shop/package-lock.json index a5de8c5..714dd3f 100644 --- a/parfum-shop/package-lock.json +++ b/parfum-shop/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "dependencies": { "gsap": "^3.14.2", + "lenis": "^1.3.23", "react": "^19.2.4", "react-dom": "^19.2.4", "react-router": "^7.14.0" @@ -1778,6 +1779,37 @@ "json-buffer": "3.0.1" } }, + "node_modules/lenis": { + "version": "1.3.23", + "resolved": "https://registry.npmjs.org/lenis/-/lenis-1.3.23.tgz", + "integrity": "sha512-YxYq3TJqj9sJNv0V9SkyQHejt14xwyIwgDaaMK89Uf9SxQfIszu+gTQSSphh6BWlLTNVKvvXAGkg+Zf+oFIevg==", + "license": "MIT", + "workspaces": [ + "packages/*", + "playground", + "playground/*" + ], + "funding": { + "type": "github", + "url": "https://github.com/sponsors/darkroomengineering" + }, + "peerDependencies": { + "@nuxt/kit": ">=3.0.0", + "react": ">=17.0.0", + "vue": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@nuxt/kit": { + "optional": true + }, + "react": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", diff --git a/parfum-shop/package.json b/parfum-shop/package.json index 6bb12c3..4fae9bf 100644 --- a/parfum-shop/package.json +++ b/parfum-shop/package.json @@ -13,6 +13,7 @@ }, "dependencies": { "gsap": "^3.14.2", + "lenis": "^1.3.23", "react": "^19.2.4", "react-dom": "^19.2.4", "react-router": "^7.14.0" diff --git a/parfum-shop/src/App.jsx b/parfum-shop/src/App.jsx index c2fcc0a..6532791 100644 --- a/parfum-shop/src/App.jsx +++ b/parfum-shop/src/App.jsx @@ -14,6 +14,7 @@ import ScrollToTop from "./components/ScrollToTop"; import ShopDrawer from "./components/ShopDrawer"; import CartToast from "./components/CartToast"; import { ProductTransitionProvider } from "./components/ProductTransition"; +import useLenisSmoothScroll from "./hooks/useLenisSmoothScroll"; import useScrollTextReveal from "./hooks/useScrollTextReveal"; import { ThemeProvider } from "./theme/ThemeContext"; import "./style/textReveal.css"; @@ -30,7 +31,9 @@ function App() { }); const shouldFlushFooter = location.pathname === "/" || location.pathname.startsWith("/duft/"); + const showSupportChatbot = location.pathname === "/"; + useLenisSmoothScroll(location.pathname); useScrollTextReveal(routeContentRef, location.pathname); useEffect(() => { @@ -72,7 +75,7 @@ function App() {