Clear leftover setup answers on template paths that skip those questions, and treat Continue as an edit so restored ticks are not overwritten.

This commit is contained in:
adilallo committed 2026-11-05 21:02:04 -07:00
1 parent bdaf1818d9
commit cec83eb27f
3 files changed
+43 -4

No files matched your search

@@ -999,6 +999,7 @@ function CreateFlowLayoutContent({
}
className={CREATE_FLOW_FOOTER_BUTTON_CLASS}
onClick={() => {
markCreateFlowInteraction();
goToNextStep();
}}
>
@@ -30,7 +30,9 @@ export type UseTemplateReviewActionsResult = {
* Customize: apply the template's selections onto state and route to
* `/create/core-values` (if community name is set) or `/create/informational`
* with a `pendingTemplateAction` pin so `/create/review` can later replace
* itself with `/create/core-values`.
* itself with `/create/core-values`. A named community skips setup
* questions, so leftover setup answers are dropped and cannot change
* suggested cards.
*/
handleCustomize: () => Promise<void>;
/**
@@ -39,8 +41,9 @@ export type UseTemplateReviewActionsResult = {
* Customize) so drilling from final-review via + shows selected cards, drop
* the Values row from `state.sections`. Direct template entry routes to
* `/create/community-name` with a pin so Next/Back collect only name →
* description → photo. In-flow (`?fromFlow=1`, community steps already done)
* routes to `/create/confirm-stakeholders`.
* description → photo, and drops leftover setup answers along with the
* other identity fields. In-flow (`?fromFlow=1`, community steps already
* done) routes to `/create/confirm-stakeholders` and keeps those answers.
*/
handleUseWithoutChanges: () => Promise<void>;
};
@@ -128,7 +131,7 @@ export function useTemplateReviewActions({
},
templateReviewBackSlug: undefined,
...(hasCommunityName
? { pendingTemplateAction: undefined }
? { pendingTemplateAction: undefined, setupTraits: undefined }
: {
pendingTemplateAction: {
slug: templateReviewSlug,
@@ -256,6 +259,7 @@ export function useTemplateReviewActions({
communityAvatarUrl: undefined,
currentStep: undefined,
templateReviewEntryFromCreateFlow: undefined,
setupTraits: undefined,
pendingTemplateAction: {
slug: templateReviewSlug,
mode: "useWithoutChanges",