Keep a failed Profile rules load from looking like an empty account.

This commit is contained in:
adilallo committed 2026-11-11 11:39:57 -07:00
1 parent c332b26683
commit da6388eef3
3 files changed
+39 -2

No files matched your search

@@ -46,6 +46,8 @@ export type ProfilePageViewProps = {
/** `m` = {@link List} M; `l` = List L at `xl` per Figma `22143:900256`. */
profileListSize: Extract<ListSize, "m" | "l">;
rules: MyPublishedRule[];
/** True only after `fetchMyPublishedRules` succeeds. Dismissing the warning does not set this. */
rulesLoaded: boolean;
rulesError: boolean;
draft: ServerDraftForProfile | null;
showDraftCard: boolean;
@@ -171,6 +173,7 @@ export function ProfilePageView({
profileLgUp,
profileListSize,
rules,
rulesLoaded,
rulesError,
draft,
showDraftCard,
@@ -235,7 +238,10 @@ export function ProfilePageView({
? t("welcomeBodyFirstRule")
: undefined;
const showEmptyYourRules =
ownedRules.length === 0 && !showDraftCard && !rulesError;
rulesLoaded &&
ownedRules.length === 0 &&
!showDraftCard &&
!rulesError;
const profileOptionsItems = useMemo((): ListItem[] => {
return [