Public birth chart: keep it across pages for the tab, login for the summary
CI / build (push) Successful in 5m52s
CI / deploy (push) Skipped
CI / test (push) Successful in 1m49s

The typed birth data and the calculated chart stay in sessionStorage (no
cookie, gone with the tab), so they are back after visiting another page;
'Adatok törlése' forgets them. User-input storage for the session needs
no consent; the privacy pages say so. Signing up in the same tab fills
the profile with them.

The offer next to the chart now says the short summary needs a login.
Logged-in users get 'Csillagjegyek' in the menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-21 21:04:26 +00:00
co-authored by Claude Opus 5.5
parent 985b1e872d
commit b41dc31f3e
6 changed files with 109 additions and 14 deletions
@@ -69,7 +69,7 @@ export function BirthForm({
if (initial || person) return;
let draft: BirthDraft | null = null;
try {
draft = JSON.parse(localStorage.getItem(BIRTH_DRAFT_KEY) ?? "null");
draft = JSON.parse(sessionStorage.getItem(BIRTH_DRAFT_KEY) ?? "null");
} catch {
return;
}
@@ -132,7 +132,7 @@ export function BirthForm({
: { label: "Saját képlet", is_primary: true, birth },
});
try {
localStorage.removeItem(BIRTH_DRAFT_KEY);
sessionStorage.removeItem(BIRTH_DRAFT_KEY);
} catch {
// storage blocked
}