SurfSense/surfsense_web/app/(home)/layout.tsx
DESKTOP-RTLN3BA\$punk 4e5c13f60a feat: readded google signins and add global announcement feature
- Updated .env.example to include new environment variables for Google authentication and global announcement settings.
- Integrated Google sign-in functionality in SignInButton and HeroSection components, allowing users to log in with their Google accounts.
- Added GlobalAnnouncement component to display maintenance notices or announcements on the homepage layout.
- Enhanced styling for Google sign-in buttons to improve user experience.
2026-06-17 21:29:14 -07:00

25 lines
833 B
TypeScript

"use client";
import { usePathname } from "next/navigation";
import { FooterNew } from "@/components/homepage/footer-new";
import { GlobalAnnouncement } from "@/components/homepage/global-announcement";
import { Navbar } from "@/components/homepage/navbar";
export default function HomePageLayout({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
const isAuthPage = pathname === "/login" || pathname === "/register";
const isFreeModelChat = /^\/free\/[^/]+$/.test(pathname);
if (isFreeModelChat) {
return <>{children}</>;
}
return (
<main className="min-h-screen bg-linear-to-b from-gray-50 to-gray-100 text-gray-900 dark:from-black dark:to-gray-900 dark:text-white overflow-x-hidden">
<GlobalAnnouncement />
<Navbar />
{children}
{!isAuthPage && <FooterNew />}
</main>
);
}