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:
parent
140d59b898
commit
a6b17f0437
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user