fix: landing page improvements and SpaceSwitcher domain support

- SpaceSwitcher auto-derives domain from window.location
- Fix landing page issues (redirect bug, duplicate footers,
  broken links, missing content)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-24 23:32:44 -08:00
parent 16edbdf544
commit 108ac3e0a9
1 changed files with 1 additions and 20 deletions

View File

@ -27,7 +27,6 @@ export default function HomePage() {
const [roomName, setRoomName] = useState('');
const [isLoaded, setIsLoaded] = useState(false);
const [lastRoom, setLastRoom] = useState<string | null>(null);
const [isRedirecting, setIsRedirecting] = useState(false);
// Load saved user info from localStorage on mount
// If opened as installed PWA (standalone mode), auto-redirect to last room
@ -43,17 +42,10 @@ export default function HomePage() {
loadedEmoji = user.emoji;
}
}
// Load last visited room
// Load last visited room (show "Rejoin" button, but don't auto-redirect)
const lastVisited = localStorage.getItem('rmaps_last_room');
if (lastVisited) {
setLastRoom(lastVisited);
// Auto-redirect returning users to their last room
if (stored) {
setIsRedirecting(true);
router.push(`/${lastVisited}`);
return;
}
}
} catch {
// Ignore parse errors
@ -110,17 +102,6 @@ export default function HomePage() {
router.push(`/${lastRoom}`);
};
// Show loading screen while redirecting to last room
if (isRedirecting) {
return (
<div className="min-h-screen flex items-center justify-center bg-slate-900">
<div className="text-center">
<div className="w-8 h-8 border-2 border-emerald-500 border-t-transparent rounded-full animate-spin mx-auto mb-4" />
<div className="text-white/60">Rejoining your map...</div>
</div>
</div>
);
}
return (
<div className="min-h-screen bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900">