Login still agrees to Terms of Service, but the page no longer says a community Rule is openly licensed, and Ask an organizer opens the inquiry dialog.
34 lines
999 B
TypeScript
34 lines
999 B
TypeScript
"use client";
|
|
|
|
import { useCallback, useState } from "react";
|
|
import AskOrganizerInquiryModal from "../../components/modals/AskOrganizerInquiry";
|
|
|
|
const LINK_CLASS =
|
|
"cursor-pointer border-none bg-transparent p-0 font-[inherit] text-[inherit] underline decoration-solid underline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2";
|
|
|
|
type LegalAskOrganizerLinkProps = {
|
|
label: string;
|
|
};
|
|
|
|
/** Inline legal-page control that opens the Ask an organizer dialog. */
|
|
export default function LegalAskOrganizerLink({
|
|
label,
|
|
}: LegalAskOrganizerLinkProps) {
|
|
const [open, setOpen] = useState(false);
|
|
const openInquiry = useCallback(() => setOpen(true), []);
|
|
const closeInquiry = useCallback(() => setOpen(false), []);
|
|
|
|
return (
|
|
<>
|
|
<button
|
|
type="button"
|
|
className={LINK_CLASS}
|
|
onClick={openInquiry}
|
|
>
|
|
{label}
|
|
</button>
|
|
<AskOrganizerInquiryModal isOpen={open} onClose={closeInquiry} />
|
|
</>
|
|
);
|
|
}
|