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:
adilallo committed 2026-11-05 16:14:04 -07:00
1 parent ca1f58a50c
commit 2348a9e94f
61 files changed
+1110 -421

No files matched your search

+12 -6
View File
@@ -21,11 +21,17 @@ export function isValidCreateFlowSaveEmail(value: unknown): boolean {
// Native type=email rejects whitespace; jsdom’s checkValidity does not.
if (/\s/.test(value)) return false;
if (typeof document === "undefined") {
return EMAIL_FALLBACK_PATTERN.test(value);
if (!EMAIL_FALLBACK_PATTERN.test(value)) return false;
} else {
const input = document.createElement("input");
input.type = "email";
input.required = true;
input.value = value;
if (!input.checkValidity()) return false;
}
const input = document.createElement("input");
input.type = "email";
input.required = true;
input.value = value;
return input.checkValidity();
// Native type=email allows a single domain label (`maya@example`). The
// save-progress field needs a dotted domain so we can actually send mail.
const at = value.lastIndexOf("@");
const domain = at >= 0 ? value.slice(at + 1) : "";
return domain.includes(".");
}