Walk Create Community through the Figma screens and restore a chosen logo after reload, so a guest can leave without saving until they reach the email step.
This commit is contained in:
1 parent
ca1f58a50c
commit
2348a9e94f
61 files changed
+1110
-421
No files matched your search
@@ -172,13 +172,13 @@ export function getStepIndex(step: CreateFlowStep | null | undefined): number {
|
||||
return FLOW_STEP_ORDER.indexOf(step);
|
||||
}
|
||||
|
||||
/** First wizard step that offers Save & Exit (first Create Community select). */
|
||||
const SAVE_EXIT_FROM_STEP_INDEX = getStepIndex("community-structure");
|
||||
/** First wizard step that offers Save and exit (after the community is ready to keep). */
|
||||
const SAVE_EXIT_FROM_STEP_INDEX = getStepIndex("community-save");
|
||||
|
||||
/**
|
||||
* Top-nav Save & Exit (vs Exit). Guests and signed-in users share this from
|
||||
* `community-structure` onward and on `edit-rule`. On completed, guests still
|
||||
* get Save & Exit (claim/login); signed-in users get Exit (already owned).
|
||||
* Top-nav Save and exit (vs Exit). Guests and signed-in users share this from
|
||||
* `community-save` onward and on `edit-rule`. On completed, guests still
|
||||
* get Save and exit (claim/login); signed-in users get Exit (already owned).
|
||||
*
|
||||
* @param sessionUser `null` is a guest. `undefined` (session in flight) is
|
||||
* not a guest — completed stays Exit until the session resolves.
|
||||
@@ -307,14 +307,19 @@ export const CREATE_FLOW_REVIEW_RETURN_QUERY_KEY = "reviewReturn" as const;
|
||||
export const CREATE_FLOW_MANAGE_STAKEHOLDERS_QUERY = "manageStakeholders" as const;
|
||||
export const CREATE_FLOW_MANAGE_STAKEHOLDERS_VALUE = "1" as const;
|
||||
|
||||
export type CreateFlowReviewReturnTarget = "final-review" | "edit-rule";
|
||||
export type CreateFlowReviewReturnTarget =
|
||||
| "final-review"
|
||||
| "edit-rule"
|
||||
| "review";
|
||||
|
||||
export function parseReviewReturnSearchParam(
|
||||
searchParams: { get: (name: string) => string | null } | null | undefined,
|
||||
): CreateFlowReviewReturnTarget | null {
|
||||
if (!searchParams) return null;
|
||||
const raw = searchParams.get(CREATE_FLOW_REVIEW_RETURN_QUERY_KEY);
|
||||
if (raw === "final-review" || raw === "edit-rule") return raw;
|
||||
if (raw === "final-review" || raw === "edit-rule" || raw === "review") {
|
||||
return raw;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user