Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

423 B
Raw Blame
import { useAuth } from "@editor/auth/UseSession";
import { requestProcessorSignup } from "@editor/services/processorSignup";

/** Guests see the shared signup prompt; a false result means chat must stay closed. */
export function useChatAccess(): () => boolean {
  const { isAnonymous } = useAuth();
  return () => {
    if (isAnonymous) {
      requestProcessorSignup();
      return false;
    }
    return true;
  };
}