Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
epenflow committed Feb 5, 2024
1 parent 1d05560 commit 51b351c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Footer from '@/components/Footer';
import { ContextProvider } from '@/lib/context/ContextProvider';
import Trash from '@/components/Section/Gallery/Trash';
import Error from '@/components/Section/Gallery/Trash';
import LenisScroll from '@/components/LenisScroll';
import LenisScroll from '@/lib/context/LenisScroll';

const inter = Inter({ subsets: ['latin'] });

Expand Down
30 changes: 0 additions & 30 deletions src/components/LenisScroll.tsx

This file was deleted.

23 changes: 23 additions & 0 deletions src/lib/context/LenisScroll.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use client';
import React from 'react';
import { ReactLenis } from '@studio-freight/react-lenis';
import gsap from 'gsap';
interface Props {
children: React.ReactNode;
}
const LenisScroll = ({ children }: Props) => {
return (
<ReactLenis
root
options={{
lerp: 0.1,
duration: 5000,
smoothTouch: true,
syncTouch: true,
}}>
{children}
</ReactLenis>
);
};

export default LenisScroll;

0 comments on commit 51b351c

Please sign in to comment.