Invite people after review, then finish the Rule, with login before inviting and Invite your members on Profile.

This commit is contained in:
adilallo committed 2026-11-06 08:56:13 -07:00
1 parent 88bfccd1e7
commit 70ceb73104
31 files changed
+1388 -401

No files matched your search

+18 -1
View File
@@ -8,10 +8,15 @@ import {
useState,
type ReactNode,
} from "react";
import { useTranslation } from "./MessagesContext";
import Login from "../components/modals/Login";
import LoginForm from "../components/modals/Login/LoginForm";
export type AuthModalLoginVariant = "default" | "saveProgress" | "keepRule";
export type AuthModalLoginVariant =
| "default"
| "saveProgress"
| "keepRule"
| "invite";
export type AuthModalBackdropVariant = "solid" | "blurredYellow";
@@ -35,6 +40,7 @@ type AuthModalContextValue = {
const AuthModalContext = createContext<AuthModalContextValue | null>(null);
export function AuthModalProvider({ children }: { children: ReactNode }) {
const tLogin = useTranslation("pages.login");
const [open, setOpen] = useState(false);
const [opts, setOpts] = useState<OpenLoginOptions>({});
@@ -72,6 +78,17 @@ export function AuthModalProvider({ children }: { children: ReactNode }) {
backdropVariant={backdropVariant}
usePortal
ariaLabelledBy="login-modal-heading"
belowCard={
opts.variant === "invite" ? (
<button
type="button"
onClick={closeLogin}
className="w-full text-center text-small-paragraph text-[var(--color-content-default-tertiary)]"
>
{tLogin("backToYourRule")}
</button>
) : undefined
}
>
<LoginForm
variant={opts.variant ?? "default"}