refactor: Streamline map loading and drawer rendering, remove tooltip arrow, and update Navbar tooltip styling with a pulsing indicator.

This commit is contained in:
2025-12-05 02:31:48 -05:00
parent dd10456a6e
commit 64d76f8347
4 changed files with 28 additions and 40 deletions

View File

@@ -11,16 +11,11 @@ import { WelcomeModal } from "~/components/WelcomeModal";
export default function HomePage() {
const [selectedShop, setSelectedShop] = useState<typeof COFFEE_SHOPS[0] | null>(null);
const [isDiscoveryOpen, setIsDiscoveryOpen] = useState(true);
const [isMapLoaded, setIsMapLoaded] = useState(false);
useEffect(() => {
// Hide discovery panel on mobile initially
const isMobile = window.innerWidth < 640; // sm breakpoint
setIsDiscoveryOpen(!isMobile);
// Mark map as loaded after a short delay
const timer = setTimeout(() => setIsMapLoaded(true), 500);
return () => clearTimeout(timer);
}, []);
return (
@@ -40,16 +35,14 @@ export default function HomePage() {
/>
</div>
{/* Right Drawer - only show after map loads */}
{isMapLoaded && (
<Drawer
shop={selectedShop}
shops={COFFEE_SHOPS}
onSelect={setSelectedShop}
onClose={() => setSelectedShop(null)}
isOpen={isDiscoveryOpen}
/>
)}
{/* Right Drawer */}
<Drawer
shop={selectedShop}
shops={COFFEE_SHOPS}
onSelect={setSelectedShop}
onClose={() => setSelectedShop(null)}
isOpen={isDiscoveryOpen}
/>
<WelcomeModal />
</main>
);