fix: corrige rendu markdown dans comparaison versions
This commit is contained in:
@@ -10,6 +10,7 @@ import {useState, useEffect} from 'react'
|
||||
import {useSession} from 'next-auth/react'
|
||||
import Snackbar from '@mui/material/Snackbar'
|
||||
import Alert from '@mui/material/Alert'
|
||||
import MarkdownRenderer from '../markdown-renderer/index.js'
|
||||
import {handleVote, getUserVote} from '../../lib/directus.js'
|
||||
import {formatDate} from '@/lib/format.js'
|
||||
|
||||
@@ -74,16 +75,32 @@ export default function VersionComparison({versionData, versionCompare}) {
|
||||
<Grid container spacing={2}>
|
||||
<Grid xs={6}>
|
||||
<Paper sx={{padding: 1, backgroundColor: '#E8F5E9'}}>
|
||||
<Typography variant='body1' sx={{color: '#388E3C', fontWeight: 'bold'}}>
|
||||
{main.contenu}
|
||||
<Box sx={{color: '#388E3C', fontWeight: 'bold'}}>
|
||||
<MarkdownRenderer
|
||||
content={main.contenu}
|
||||
color='#388E3C'
|
||||
fallbackComponent={({children, ...props}) => (
|
||||
<Typography variant='body1' sx={{color: '#388E3C', fontWeight: 'bold'}} {...props}>
|
||||
{children}
|
||||
</Typography>
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
</Paper>
|
||||
</Grid>
|
||||
<Grid xs={6}>
|
||||
<Paper sx={{padding: 1, backgroundColor: outdated ? '#F9E8E8' : '#E3F2FD'}}>
|
||||
<Typography variant='body1' sx={{color: outdated ? '#D32F2F' : '#1976D2', fontWeight: 'bold'}}>
|
||||
{current.contenu}
|
||||
<Box sx={{color: outdated ? '#D32F2F' : '#1976D2', fontWeight: 'bold'}}>
|
||||
<MarkdownRenderer
|
||||
content={current.contenu}
|
||||
color={outdated ? '#D32F2F' : '#1976D2'}
|
||||
fallbackComponent={({children, ...props}) => (
|
||||
<Typography variant='body1' sx={{color: outdated ? '#D32F2F' : '#1976D2', fontWeight: 'bold'}} {...props}>
|
||||
{children}
|
||||
</Typography>
|
||||
)}
|
||||
/>
|
||||
</Box>
|
||||
{!outdated && session?.user && (
|
||||
<>
|
||||
<Box>
|
||||
|
||||
Reference in New Issue
Block a user