From c49b6c41b0ec33703b7e2d8714c7064dd6f939c5 Mon Sep 17 00:00:00 2001 From: Clinton Lunn Date: Sat, 7 Dec 2024 11:31:56 -0700 Subject: [PATCH] refactor: check if on map page instead, and change size of edit area button --- src/components/maps/TileHandlers/CragContent.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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() === ''