Skip to content

Commit

Permalink
fix:added smooth scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
TenzDelek committed Jun 6, 2024
1 parent dfee63d commit 5f47cf0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@react-three/drei": "^9.105.6",
"@react-three/fiber": "^8.16.6",
"@reduxjs/toolkit": "^2.2.4",
"@studio-freight/lenis": "^1.0.42",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"convex": "^1.11.3",
Expand Down
12 changes: 11 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
'use client'
import { FollowingPointerDemo } from "@/components/shared/FollowingCard";
import { Hero } from "@/components/shared/Hero";
import StartNow from "@/components/shared/StartNow";
import { AnimatedTooltipPreview } from "@/components/shared/TooltipSection";
import Header from "@/components/shared/Header";
import Footer from "@/components/shared/Footer";
import ScrollToTopButton from "@/components/shared/ScrollUp";

import Lenis from '@studio-freight/lenis';
import { useEffect } from "react";
export default function Home() {
useEffect(() => {
const lenis = new Lenis();
function raf(time :any) {
lenis.raf(time);
requestAnimationFrame(raf);
}
requestAnimationFrame(raf);
}, []);
return (
<>
<div className="relative">
Expand Down

0 comments on commit 5f47cf0

Please sign in to comment.