content: cut portfolio copy to fragments, add proofHeadline, drop ssh
This commit is contained in:
@@ -3,20 +3,18 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { contact } from "@/lib/portfolio";
|
||||
|
||||
type CopyTarget = "email" | "ssh";
|
||||
type CopyTarget = "email";
|
||||
type CopyStatus = "idle" | "copied" | "failed";
|
||||
|
||||
const rows = [
|
||||
{ label: "EMAIL", value: contact.email, kind: "copy" as const, target: "email" as CopyTarget },
|
||||
{ label: "GIT", value: contact.git, kind: "link" as const },
|
||||
{ label: "LINKEDIN", value: contact.linkedIn, kind: "link" as const },
|
||||
{ label: "SSH", value: contact.ssh, kind: "copy" as const, target: "ssh" as CopyTarget },
|
||||
];
|
||||
|
||||
export function ContactTerminal() {
|
||||
const [copyState, setCopyState] = useState<Record<CopyTarget, CopyStatus>>({
|
||||
email: "idle",
|
||||
ssh: "idle",
|
||||
});
|
||||
const resetTimers = useRef<Partial<Record<CopyTarget, ReturnType<typeof setTimeout>>>>({});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user