Say

tcmts.share.Say · #6qoqz5xx · term · runs on the server

uses tcmts.share.shareNow, which uses process

Where the viewer comments from: a form, or a note to sign in.

import { at, CommentForm, shareNow } from "#codebase/tcmts/share";
import type { Contribution } from "#codebase/tcmts/store";

export function Say({ c, about, fixed }: { c: Contribution; about: string[]; fixed?: string }) {
  const s = shareNow();
  if (s.caller.role === "reader")
    return (
      <div className="notice">
        Commenting takes a token: <a href={at(`/sign-in?then=${encodeURIComponent(`/contributions/${c.id}`)}`)}>sign in</a> with the one{" "}
        <code>tcm contribute</code> uses.
      </div>
    );
  return <CommentForm id={c.id} about={about} fixed={fixed} named={s.caller.role === "maintainer"} as={s.caller.role === "contributor" ? `@${s.caller.handle}` : undefined} />;
}

uses

used by