diff --git a/src/components/maps/TileHandlers/CragContent.tsx b/src/components/maps/TileHandlers/CragContent.tsx index 30f0a08b3..0de8c3503 100644 --- a/src/components/maps/TileHandlers/CragContent.tsx +++ b/src/components/maps/TileHandlers/CragContent.tsx @@ -11,7 +11,7 @@ export const CragDrawerContent: React.FC = ({ id, areaNam const friendlyUrl = getAreaPageFriendlyUrl(id, areaName) const editUrl = `/editArea/${id}/general` const pathname = `${usePathname()}${window.location.search}` - const isAreaPage = pathname.startsWith('/area/') + const isMapPage = pathname.startsWith('/maps?') return ( <> @@ -19,8 +19,8 @@ export const CragDrawerContent: React.FC = ({ id, areaNam media={} heading={{areaName}} subheading={} - cta={Edit area} - share={!isAreaPage && } + cta={Edit area} + share={isMapPage && } >
{description == null || description.trim() === ''