"use client"; import { useFeatureFlagVariantKey } from "@posthog/react"; import { AnimatePresence, motion } from "motion/react"; import Link from "next/link"; import type React from "react"; import { useEffect, useRef, useState } from "react"; import Balancer from "react-wrap-balancer"; import { HeroCarousel } from "@/components/ui/hero-carousel"; import { AUTH_TYPE, BACKEND_URL } from "@/lib/env-config"; import { trackLoginAttempt } from "@/lib/posthog/events"; import { cn } from "@/lib/utils"; // Official Google "G" logo with brand colors const GoogleLogo = ({ className }: { className?: string }) => ( ); export function HeroSection() { const containerRef = useRef(null); const parentRef = useRef(null); const heroVariant = useFeatureFlagVariantKey("notebooklm_superpowers_flag"); const isNotebookLMVariant = heroVariant === "superpowers"; return ( {isNotebookLMVariant ? ( NotebookLM with Superpowers ) : ( NotebookLM for Teams )} {/* // TODO:aCTUAL DESCRITION */} Connect any AI to your documents, Drive, Notion and more, then chat with it, generate podcasts and reports, or even invite your team. {/* */} ); } function GetStartedButton() { const isGoogleAuth = AUTH_TYPE === "GOOGLE"; const handleGoogleLogin = () => { trackLoginAttempt("google"); window.location.href = `${BACKEND_URL}/auth/google/authorize-redirect`; }; if (isGoogleAuth) { return ( {/* Animated gradient background on hover */} {/* Google logo with subtle animation */} Continue with Google ); } return ( Get Started ); } function ContactSalesButton() { return ( Contact Sales ); } const BackgroundGrids = () => { return ( ); }; const CollisionMechanism = ({ parentRef, beamOptions = {}, }: { parentRef: React.RefObject; beamOptions?: { initialX?: number; translateX?: number; initialY?: number; translateY?: number; rotate?: number; className?: string; duration?: number; delay?: number; repeatDelay?: number; }; }) => { const beamRef = useRef(null); const [collision, setCollision] = useState<{ detected: boolean; coordinates: { x: number; y: number } | null; }>({ detected: false, coordinates: null }); const [beamKey, setBeamKey] = useState(0); const [cycleCollisionDetected, setCycleCollisionDetected] = useState(false); useEffect(() => { const checkCollision = () => { if (beamRef.current && parentRef.current && !cycleCollisionDetected) { const beamRect = beamRef.current.getBoundingClientRect(); const parentRect = parentRef.current.getBoundingClientRect(); const rightEdge = parentRect.right; if (beamRect.right >= rightEdge - 20) { const relativeX = parentRect.width - 20; const relativeY = beamRect.top - parentRect.top + beamRect.height / 2; setCollision({ detected: true, coordinates: { x: relativeX, y: relativeY }, }); setCycleCollisionDetected(true); if (beamRef.current) { beamRef.current.style.opacity = "0"; } } } }; const animationInterval = setInterval(checkCollision, 100); return () => clearInterval(animationInterval); }, [cycleCollisionDetected, parentRef]); useEffect(() => { if (collision.detected && collision.coordinates) { setTimeout(() => { setCollision({ detected: false, coordinates: null }); setCycleCollisionDetected(false); // Set beam opacity to 0 if (beamRef.current) { beamRef.current.style.opacity = "1"; } }, 2000); // Reset the beam animation after a delay setTimeout(() => { setBeamKey((prevKey) => prevKey + 1); }, 2000); } }, [collision]); return ( <> {collision.detected && collision.coordinates && ( )} > ); }; const Explosion = ({ ...props }: React.HTMLProps) => { const spans = Array.from({ length: 20 }, (_, index) => ({ id: index, initialX: 0, initialY: 0, directionX: Math.floor(Math.random() * 80 - 40), directionY: Math.floor(Math.random() * -50 - 10), })); return ( {spans.map((span) => ( ))} ); }; const GridLineVertical = ({ className, offset }: { className?: string; offset?: string }) => { return ( ); };
Connect any AI to your documents, Drive, Notion and more,
then chat with it, generate podcasts and reports, or even invite your team.