diff --git a/src/features/sections/contact/Contact.tsx b/src/features/sections/contact/Contact.tsx index 067fc2e..ef1bdea 100644 --- a/src/features/sections/contact/Contact.tsx +++ b/src/features/sections/contact/Contact.tsx @@ -1,18 +1,18 @@ "use client"; -import { useEffect, useState } from "react"; +import { useEffect } from "react"; import { profile } from "@/content/profile"; -import { liveSocials } from "@/content/socials"; +import { liveSocials, socials } from "@/content/socials"; import { CONTACT_EVENT } from "@/lib/runtime"; import { Keycap } from "@/ui/Keycap"; import { SocialIcon } from "@/ui/SocialIcon"; -import { ContactDialog } from "./ContactDialog"; -export function Contact() { - const [open, setOpen] = useState(false); +const linkedin = socials.find((s) => s.id === "linkedin")!.href; +export function Contact() { useEffect(() => { - const onOpen = () => setOpen(true); + // The 3D Enter key dispatches this from its click handler, so the popup is user-initiated. + const onOpen = () => window.open(linkedin, "_blank", "noopener,noreferrer"); window.addEventListener(CONTACT_EVENT, onOpen); return () => window.removeEventListener(CONTACT_EVENT, onOpen); }, []); @@ -39,16 +39,12 @@ export function Contact() { A role, a mission or a collaboration. Press the key, or write to me directly.