Files
community-rule/app/(marketing)/_components/LegalAskOrganizerLink.tsx
T
adilallo 4b90bce006 Replace the terms page CC BY-SA claim with a counsel-review notice.
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.
2026-11-23 10:40:16 -07:00

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} />
</>
);
}