add toggle fix and possible log out issue
This commit is contained in:
@@ -134,11 +134,16 @@
|
||||
// their OTP on /{fam}/join/{username} then landing on /{fam}/{username}.
|
||||
// The handle comes from the session (not page.params) so jump-back-in lands
|
||||
// on the user's own dashboard even from the bare /{fam} page.
|
||||
// The slug MUST come from the fam record — page.params.fam may be the PB
|
||||
// id (login ID-fallback / stale link) when page.data.fam failed to load,
|
||||
// and recording that poisons the shortcut (famSlug === famName === id).
|
||||
$effect(() => {
|
||||
if (!page.data.session) return;
|
||||
const slug = page.data.fam?.slug as string;
|
||||
if (!slug) return;
|
||||
recordShortcut({
|
||||
famSlug: (page.data.fam?.slug as string) || page.params.fam || '',
|
||||
famName: (page.data.fam?.name as string) || page.params.fam || '',
|
||||
famSlug: slug,
|
||||
famName: (page.data.fam?.name as string) || slug,
|
||||
userName: page.data.session.username || page.params.username || ''
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user