diff --git a/app/page.tsx b/app/page.tsx index 8612531..b838e85 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -2,6 +2,7 @@ import { ArrowRight, ArrowUpRight } from "lucide-react"; import { Footer } from "@/components/footer"; import { Globe } from "@/components/globe"; import { GithubBadge } from "@/components/github-badge"; +import { CalEmbed } from "@/components/cal-embed"; const EVENTS = [ { id: "01", title: "Lima #1", city: "Lima", country: "Peru", date: "Aug 2024" }, @@ -66,6 +67,12 @@ export default function HomePage() { > Events + + Schedule + + {/* ════════════════════════════════════════ + SCHEDULE + ════════════════════════════════════════ */} + + + + + {/* Section header */} + + + Schedule + + + + + Book a Meeting + + + + + + + + + Want to chat about partnerships, sponsorships, or bringing Code + Brew to your city? Schedule a time to connect with our team. + + + + {/* Cal.com embed */} + + + + + + + + {/* ════════════════════════════════════════ PARTNERS ════════════════════════════════════════ */} diff --git a/bun.lock b/bun.lock index a2b3265..1e166fd 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "codebrew.tech", @@ -25,7 +26,7 @@ "png-to-ico": "^3.0.1", "sharp": "^0.34.5", "tailwindcss": "^4", - "typescript": "^5", + "typescript": "5.9.3", }, }, }, diff --git a/components/cal-embed.tsx b/components/cal-embed.tsx new file mode 100644 index 0000000..337f577 --- /dev/null +++ b/components/cal-embed.tsx @@ -0,0 +1,54 @@ +"use client"; + +import { useEffect, useRef } from "react"; + +interface CalEmbedProps { + calLink?: string; + className?: string; +} + +export function CalEmbed({ + calLink = "team/codebrew/meet", + className = "" +}: CalEmbedProps) { + const calRef = useRef(null); + + useEffect(() => { + // Load Cal.com embed script + const script = document.createElement("script"); + script.src = "https://app.cal.com/embed/embed.js"; + script.async = true; + + script.onload = () => { + // Initialize Cal after script loads + if (typeof window !== "undefined" && "Cal" in window) { + const Cal = (window as Window & { Cal: (action: string, config: { origin: string }) => void }).Cal; + Cal("init", {origin: "https://app.cal.com"}); + } + }; + + document.body.appendChild(script); + + return () => { + // Cleanup script on unmount + const scripts = document.querySelectorAll('script[src="https://app.cal.com/embed/embed.js"]'); + scripts.forEach(s => s.remove()); + }; + }, []); + + return ( + + + + ); +}
+ Want to chat about partnerships, sponsorships, or bringing Code + Brew to your city? Schedule a time to connect with our team. +