fix: Adjust drawer pointer events for better interaction and re-enable discovery view when shop details close.

This commit is contained in:
2025-12-05 14:00:57 -05:00
parent 2873b02619
commit 6474fd135a
2 changed files with 6 additions and 3 deletions

View File

@@ -31,7 +31,10 @@ export default function HomePage() {
shop={selectedShop}
shops={COFFEE_SHOPS}
onSelect={setSelectedShop}
onClose={() => setSelectedShop(null)}
onClose={() => {
setSelectedShop(null);
setIsDiscoveryOpen(true);
}}
isOpen={isDiscoveryOpen}
onToggleOpen={() => setIsDiscoveryOpen(false)}
/>

View File

@@ -51,10 +51,10 @@ export default function Drawer({ shop, shops, onSelect, onClose, isOpen, onToggl
<div
className={`absolute top-20 left-0 h-[calc(100dvh-6rem)] w-full sm:w-[400px] z-30 px-4 pt-3 pointer-events-none transition-transform duration-300 ease-in-out ${isOpen || shop ? 'translate-x-0' : '-translate-x-full'}`}
>
<Card className="h-full w-full bg-background/60 dark:bg-background/65 backdrop-blur-2xl border-border/50 overflow-hidden relative shadow-xl rounded-r-xl border-0">
<Card className="h-full w-full bg-background/60 dark:bg-background/65 backdrop-blur-2xl border-border/50 overflow-hidden relative shadow-xl rounded-r-xl border-0 pointer-events-auto">
{/* Details View */}
<div
className={`absolute inset-0 z-20 transition-transform duration-300 ease-in-out bg-background/80 backdrop-blur-3xl ${shop ? 'translate-x-0' : 'translate-x-full'}`}
className={`absolute inset-0 z-20 transition-transform duration-300 ease-in-out bg-background/80 backdrop-blur-3xl ${shop ? 'translate-x-0 pointer-events-auto' : 'translate-x-full pointer-events-none'}`}
>
{activeShop && (
<div className="h-full flex flex-col relative">