fix: Fix unresponsive image in vote page (#4416)

* Fix unresponsive image scale in vote page

* Create renderer function for Image
This commit is contained in:
tainguyen-kms 2022-08-20 10:19:05 +07:00 committed by GitHub
parent 140d59b898
commit a6b17f0437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -260,6 +260,10 @@ export default function VotePage() {
return <span>{content}</span>
}
function MarkdownImage({ ...rest }) {
return <img {...rest} style={{ width: '100%', height: '100$', objectFit: 'cover' }} alt="" />
}
return (
<Trace page={PageName.VOTE_PAGE} shouldLogImpression>
<>
@ -468,7 +472,12 @@ export default function VotePage() {
<Trans>Description</Trans>
</ThemedText.DeprecatedMediumHeader>
<MarkDownWrapper>
<ReactMarkdown source={proposalData?.description} />
<ReactMarkdown
source={proposalData?.description}
renderers={{
image: MarkdownImage,
}}
/>
</MarkDownWrapper>
</AutoColumn>
<AutoColumn gap="md">