From f1e4f8361081525c08c2236c26fd2663af6053bb Mon Sep 17 00:00:00 2001 From: Clinton Lunn Date: Fri, 15 Nov 2024 17:26:24 -0700 Subject: [PATCH 1/2] fix: make description, location, and protection fields display markdown correctly --- .../climb/[[...slug]]/components/ContentBlock.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx b/src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx index 39291056d..0fbbe7409 100644 --- a/src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx +++ b/src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx @@ -1,4 +1,5 @@ import { Climb } from '@/js/types' +import Markdown from 'react-markdown' export const ContentBlock: React.FC> = ({ content: { description, location, protection } }) => { return ( @@ -6,19 +7,19 @@ export const ContentBlock: React.FC> = ({ content: { desc

Description

- {description} - + {description} {(location?.trim() !== '') && ( <>

Location

- {location} + {location} + )} {(protection?.trim() !== '') && ( <>

Protection

- {protection} + {protection} )} From 71f075545682a6386d1ed423eaf8d830ccbe32da Mon Sep 17 00:00:00 2001 From: Clinton Lunn Date: Fri, 15 Nov 2024 17:41:04 -0700 Subject: [PATCH 2/2] refactor: remove extra line --- .../(default)/climb/[[...slug]]/components/ContentBlock.tsx | 1 - src/components/maps/GlobalMap.tsx | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx b/src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx index 0fbbe7409..04db1c8b1 100644 --- a/src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx +++ b/src/app/(default)/climb/[[...slug]]/components/ContentBlock.tsx @@ -12,7 +12,6 @@ export const ContentBlock: React.FC> = ({ content: { desc <>

Location

{location} - )} diff --git a/src/components/maps/GlobalMap.tsx b/src/components/maps/GlobalMap.tsx index 2076aaa69..18c92f681 100644 --- a/src/components/maps/GlobalMap.tsx +++ b/src/components/maps/GlobalMap.tsx @@ -63,6 +63,9 @@ export const GlobalMap: React.FC = ({ crags: true }) + console.log('mapinstance', mapInstance); + + const setActiveFeatureVisual = (feature: ActiveFeature | null, fState: FeatureState): void => { if (feature == null || mapInstance == null) return mapInstance.setFeatureState({