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.
This commit is contained in:
1 parent
f795951443
commit
4b90bce006
5 files changed
+64
-55
No files matched your search
@@ -0,0 +1,33 @@
|
||||
"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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import { getRequestSiteOrigin } from "../../../lib/requestSiteOrigin";
|
||||
import { absoluteSiteUrl } from "../../../lib/siteMetadata";
|
||||
import { isPrivacyPolicyEnabled } from "../../../lib/privacyPolicyEnabled";
|
||||
import ContentBanner from "../../components/sections/ContentBanner";
|
||||
import LegalAskOrganizerLink from "./LegalAskOrganizerLink";
|
||||
|
||||
type LegalDocumentPageProps = {
|
||||
slug: LegalDocumentSlug;
|
||||
@@ -46,7 +47,10 @@ function LegalInlineText({ text }: { text: string }) {
|
||||
|
||||
const label = match[1];
|
||||
const href = match[2];
|
||||
if (href === "/privacy" && !isPrivacyPolicyEnabled()) {
|
||||
if (href === "dialog:ask-organizer") {
|
||||
nodes.push(<LegalAskOrganizerLink key={key} label={label} />);
|
||||
key += 1;
|
||||
} else if (href === "/privacy" && !isPrivacyPolicyEnabled()) {
|
||||
nodes.push(label);
|
||||
} else if (isSafeHref(href)) {
|
||||
const isInternal = href.startsWith("/") && !href.startsWith("//");
|
||||
|
||||
Reference in new issue
Block a user