mirror of
https://github.com/soconnor0919/lewisburg-coffee.git
synced 2026-02-04 23:56:32 -05:00
refactor: Streamline map loading and drawer rendering, remove tooltip arrow, and update Navbar tooltip styling with a pulsing indicator.
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user