Skip to content

Commit

Permalink
small change
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhi1992002 committed Oct 6, 2023
1 parent 94113b8 commit 562c99a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
"use client";

import Background from "@/components/background/page";
import { About } from "@/components/home/about/about";
import { Feature } from "@/components/home/feature/feature";
import { HeroPage } from "@/components/home/hero";
import { MarqueeClient } from "@/components/home/marquee";
import Lenis from "@studio-freight/lenis";
import { useEffect, useState } from "react";
import { Loading } from "@/components/Loading";
import { useRecoilValue } from "recoil";
import { loadingState } from "@/state/loading";
import { Footer } from "@/components/home/footer";

export default function Home() {
const [dimension, setDimension] = useState({ width: 0, height: 0 });
useEffect(() => {
const lenis = new Lenis();

const raf = (time: any) => {
lenis.raf(time);
requestAnimationFrame(raf);
};

const resize = () => {
setDimension({ width: window.innerWidth, height: window.innerHeight });
};

window.addEventListener("resize", resize);
requestAnimationFrame(raf);
resize();

return () => {
window.removeEventListener("resize", resize);
};
}, []);

const isLoading = useRecoilValue(loadingState);

return (
Expand Down

0 comments on commit 562c99a

Please sign in to comment.