diff --git a/frontend/app/(root)/Home.tsx b/frontend/app/(root)/Home.tsx new file mode 100644 index 0000000..3bb024a --- /dev/null +++ b/frontend/app/(root)/Home.tsx @@ -0,0 +1,45 @@ +'use client'; + +import React, {useEffect} from "react"; +import HomeServices from "@/app/(root)/sections/HomeServices"; +import {motion} from "framer-motion"; +import Hero from "@/app/(root)/sections/Hero"; +import About from "@/app/(root)/sections/About"; +import ProcessSection from "@/app/(root)/sections/ProcessSection"; +import WhyUs from "@/app/(root)/sections/WhyUs"; +import Faq from "@/app/(root)/sections/Faq"; +import ReferralSection from "@/app/(root)/sections/ReferralSection"; + +const Home = () => { + useEffect(() => { + const scrollToId = localStorage.getItem('scrollToId') + if (scrollToId) { + localStorage.removeItem('scrollToId') + const el = document.getElementById(scrollToId) + if (el) { + setTimeout(() => { + el.scrollIntoView({behavior: 'smooth', block: 'start'}) + }, 200) + } + } + }, []) + + return ( + + + + + + + + + + ); +}; + +export default Home; diff --git a/frontend/app/(root)/layout.tsx b/frontend/app/(root)/layout.tsx deleted file mode 100644 index 518d45e..0000000 --- a/frontend/app/(root)/layout.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import type {Metadata} from "next"; -import "../globals.css"; - -import Nav from "@/components/Navbar/Nav"; -import Footer from "@/components/Footer/Footer"; -import {ThemeProvider} from "@/components/provider/ThemeProvider"; -import React from "react"; -import {cookies} from "next/headers"; -import {themeColors} from "@/components/Helper/ThemeColors"; - -export const metadata: Metadata = { - title: "Rhein Software", - description: "Rhein Software Development", -}; - -export default async function RootLayout({ - children, - }: Readonly<{ - children: React.ReactNode; -}>) { - const cookieStore = await cookies(); - const theme = cookieStore.get("theme")?.value === "dark" ? "dark" : "light"; - const bgColor = themeColors[theme].primaryBg; - - return ( - - - - -