fix(newsletter): Monday reminder banner on mobile (bottom, above nav) not clipped by the map toolbar

This commit is contained in:
SkateSpots 2026-10-05 20:48:02 +07:00
parent 8a05aa3b69
commit f2bfbf4274

View file

@ -105,7 +105,6 @@ function MondayAdminReminder() {
const todayKey = new Date().toISOString().slice(0, 10);
const isAdmin = isAdminPubkey(user?.pubkey);
const alreadyDismissedToday = dismissed === todayKey;
const isMapPage = location.pathname === '/' || location.pathname === '/map';
if (
!isAdmin ||
@ -119,10 +118,12 @@ function MondayAdminReminder() {
return (
<div className={cn(
'fixed right-4 z-50 max-w-[calc(100vw-2rem)] w-80 animate-in slide-in-from-right-4 duration-300',
// On the map the right-hand toolbar (Add Spot / Weather / More) sits at the
// top, so drop the card below it; elsewhere top-20 clears the header.
isMapPage ? 'top-40' : 'top-20',
'fixed z-[1200] w-auto max-w-none animate-in slide-in-from-bottom-4 duration-300',
// Mobile: a bottom banner above the nav — never collides with the map
// toolbar / search bar (which sits at the top of the map).
'inset-x-3 bottom-[calc(4.75rem+env(safe-area-inset-bottom,0px))]',
// Desktop: the top-right card.
'md:inset-x-auto md:bottom-auto md:top-20 md:right-4 md:w-80',
)}>
<div className="bg-black/98 border-2 border-[#ccff00]/60 rounded-2xl shadow-2xl shadow-[#ccff00]/10 p-4">
<div className="flex items-start gap-3">