Skip to content

Commit

Permalink
fix: make description, location, and protection fields display markdo…
Browse files Browse the repository at this point in the history
…wn correctly (#1220)

* fix: make description, location, and protection fields display markdown correctly
  • Loading branch information
clintonlunn authored Nov 16, 2024
1 parent ab2167a commit b55540b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { Climb } from '@/js/types'
import Markdown from 'react-markdown'

export const ContentBlock: React.FC<Pick<Climb, 'content'>> = ({ content: { description, location, protection } }) => {
return (
<>
<div className='mb-3 flex justify-between items-center'>
<h3>Description</h3>
</div>
{description}

<Markdown className='wiki-content'>{description}</Markdown>
{(location?.trim() !== '') && (
<>
<h3 className='mb-3 mt-6'>Location</h3>
{location}
<Markdown className='wiki-content'>{location}</Markdown>
</>
)}

{(protection?.trim() !== '') && (
<>
<h3 className='mb-3 mt-6'>Protection</h3>
{protection}
<Markdown className='wiki-content'>{protection}</Markdown>
</>
)}
</>
Expand Down
3 changes: 3 additions & 0 deletions src/components/maps/GlobalMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export const GlobalMap: React.FC<GlobalMapProps> = ({
crags: true
})

console.log('mapinstance', mapInstance);


const setActiveFeatureVisual = (feature: ActiveFeature | null, fState: FeatureState): void => {
if (feature == null || mapInstance == null) return
mapInstance.setFeatureState({
Expand Down

0 comments on commit b55540b

Please sign in to comment.