Skip to content

Commit

Permalink
Finaizando React Markdown nas paginas com descricao
Browse files Browse the repository at this point in the history
  • Loading branch information
Wander06 committed Feb 1, 2024
1 parent 98d4b86 commit 1e2bb55
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/pages/therapies-description/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const DetailsTherapies = () => {
<div className='container-description'>
<p className="description">Descrição</p>
{(
<div className=''>
<div>
<ReactMarkdown rehypePlugins={[rehypeRaw]}>
{therapies?.attributes?.descricao}
</ReactMarkdown>
Expand Down
9 changes: 2 additions & 7 deletions src/pages/therapies-description/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const Details = styled.div`
.container-description {
padding-top: 1em;
font-size: 20px;
line-height: 23px;
li {
padding-top: 0em;
}
Expand All @@ -57,13 +59,6 @@ const Details = styled.div`
padding-bottom: 20px;
}
.descriptionCMS {
font-size: 20px;
text-align: justify;
width: 85%;
line-height: 23px;
}
.button-close,
.button-container {
padding-left: 90px;
Expand Down
13 changes: 12 additions & 1 deletion src/pages/workshop-description/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import 'swiper/css/navigation'
import 'swiper/css/thumbs'
import NavBar from '../../components/navbar'
import { Link, useParams } from 'react-router-dom'
import ReactMarkdown from 'react-markdown'
import rehypeRaw from 'rehype-raw'

export const WorkshopDetails = () => {
const [thumbsSwiper, setThumbsSwiper] = useState(null)
Expand Down Expand Up @@ -165,8 +167,17 @@ export const WorkshopDetails = () => {
</li>
</ul>
</span>
<div className='container-description'>
<p className="description">Descrição</p>
<p className="descriptionCMS">{workshops.attributes?.descricao}</p>
{(
<div>
<ReactMarkdown rehypePlugins={[rehypeRaw]}>
{workshops.attributes?.descricao}
</ReactMarkdown>
</div>
)}
</div>

{workshops.attributes?.url_inscricao !== null && (
<a
className="button-inscription"
Expand Down
19 changes: 13 additions & 6 deletions src/pages/workshop-description/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,19 @@ const Details = styled.div`
padding-bottom: 20px;
}
.descriptionCMS {
font-size: 20px;
text-align: justify;
width: 85%;
line-height: 23px;
}
.container-description {
padding-top: 1em;
font-size: 20px;
line-height: 23px;
li {
padding-top: 0em;
}
p {
padding-top: 1em;
}
}
.button-close,
.button-container {
Expand Down

0 comments on commit 1e2bb55

Please sign in to comment.