diff --git a/pages/birthdays.tsx b/pages/birthdays.tsx index fbabc10..78b24ce 100644 --- a/pages/birthdays.tsx +++ b/pages/birthdays.tsx @@ -8,6 +8,7 @@ import Head from "next/head"; export default function BirthdaysPage() { const [date, setDate] = useState(new Date()); + const [copied, setCopied] = useState("Copy!"); return ( <> @@ -19,15 +20,15 @@ export default function BirthdaysPage() { You can generate your birthday command here for UtiliBots' birthday bot. I was born on the... The format is DD/MM. - setDate(date) + date => {setDate(date); setCopied("Copy!");} } dateFormat="dd/MM" /> - Command to set my birthday: + Command to set your birthday: {`bd!setup ${Intl.DateTimeFormat().resolvedOptions().timeZone} ${moment(date).format("MM/DD")}`} - - + setCopied("Copied!")} text={`bd!setup ${Intl.DateTimeFormat().resolvedOptions().timeZone} ${date.getMonth()+1}/${date.getDate()}`}> +