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
  • Loading branch information
clintonlunn committed Nov 16, 2024
1 parent ab2167a commit f1e4f83
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
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

0 comments on commit f1e4f83

Please sign in to comment.