Commit a6b17f04 authored by tainguyen-kms's avatar tainguyen-kms Committed by GitHub

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

* Fix unresponsive image scale in vote page

* Create renderer function for Image
parent 140d59b8
...@@ -260,6 +260,10 @@ export default function VotePage() { ...@@ -260,6 +260,10 @@ export default function VotePage() {
return <span>{content}</span> return <span>{content}</span>
} }
function MarkdownImage({ ...rest }) {
return <img {...rest} style={{ width: '100%', height: '100$', objectFit: 'cover' }} alt="" />
}
return ( return (
<Trace page={PageName.VOTE_PAGE} shouldLogImpression> <Trace page={PageName.VOTE_PAGE} shouldLogImpression>
<> <>
...@@ -468,7 +472,12 @@ export default function VotePage() { ...@@ -468,7 +472,12 @@ export default function VotePage() {
<Trans>Description</Trans> <Trans>Description</Trans>
</ThemedText.DeprecatedMediumHeader> </ThemedText.DeprecatedMediumHeader>
<MarkDownWrapper> <MarkDownWrapper>
<ReactMarkdown source={proposalData?.description} /> <ReactMarkdown
source={proposalData?.description}
renderers={{
image: MarkdownImage,
}}
/>
</MarkDownWrapper> </MarkDownWrapper>
</AutoColumn> </AutoColumn>
<AutoColumn gap="md"> <AutoColumn gap="md">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment