Fixed description display

This commit is contained in:
Ryderjj89
2025-11-25 08:28:35 -05:00
parent 0f631c8755
commit 453d4eb5c6
4 changed files with 63 additions and 8 deletions

View File

@@ -839,8 +839,20 @@ const EventAdmin: React.FC = () => {
<Box sx={{ mb: 4 }}> <Box sx={{ mb: 4 }}>
<Typography variant="subtitle1" gutterBottom> <Typography variant="subtitle1" gutterBottom>
<strong>Info:</strong> {event.description || 'None'} <strong>Info:</strong>
</Typography> </Typography>
<Box
sx={{
mb: 2,
pl: 2,
'& p': { marginBottom: 1 },
'& ul, & ol': { marginLeft: 2, marginBottom: 1 },
'& li': { marginBottom: 0.5 },
'& h1, & h2, & h3': { marginTop: 2, marginBottom: 1 },
'& a': { color: 'primary.main' },
}}
dangerouslySetInnerHTML={{ __html: event.description || 'None' }}
/>
<Typography variant="subtitle1" gutterBottom> <Typography variant="subtitle1" gutterBottom>
<strong>Date:</strong> {new Date(event.date).toLocaleString()} <strong>Date:</strong> {new Date(event.date).toLocaleString()}
</Typography> </Typography>

View File

@@ -153,9 +153,25 @@ const EventList: React.FC = () => {
/> />
</Box> </Box>
{event.description && ( {event.description && (
<Typography variant="body2" color="text.secondary"> <>
<strong>Info:</strong> {event.description} <Typography variant="body2" color="text.secondary" gutterBottom>
<strong>Info:</strong>
</Typography> </Typography>
<Box
sx={{
pl: 2,
mb: 1,
color: 'text.secondary',
fontSize: '0.875rem',
'& p': { marginBottom: 0.5 },
'& ul, & ol': { marginLeft: 2, marginBottom: 0.5 },
'& li': { marginBottom: 0.25 },
'& h1, & h2, & h3': { marginTop: 1, marginBottom: 0.5, fontSize: '1rem' },
'& a': { color: 'primary.main' },
}}
dangerouslySetInnerHTML={{ __html: event.description }}
/>
</>
)} )}
<Typography variant="body2" color="text.secondary"> <Typography variant="body2" color="text.secondary">
<strong>Date:</strong> {new Date(event.date).toLocaleString()} <strong>Date:</strong> {new Date(event.date).toLocaleString()}

View File

@@ -187,8 +187,20 @@ const EventView: React.FC = () => {
<Box sx={{ mb: 4 }}> <Box sx={{ mb: 4 }}>
<Typography variant="subtitle1" gutterBottom> <Typography variant="subtitle1" gutterBottom>
<strong>Info:</strong> {event.description || 'None'} <strong>Info:</strong>
</Typography> </Typography>
<Box
sx={{
mb: 2,
pl: 2,
'& p': { marginBottom: 1 },
'& ul, & ol': { marginLeft: 2, marginBottom: 1 },
'& li': { marginBottom: 0.5 },
'& h1, & h2, & h3': { marginTop: 2, marginBottom: 1 },
'& a': { color: 'primary.main' },
}}
dangerouslySetInnerHTML={{ __html: event.description || 'None' }}
/>
<Typography variant="subtitle1" gutterBottom> <Typography variant="subtitle1" gutterBottom>
<strong>Date:</strong> {new Date(event.date).toLocaleString()} <strong>Date:</strong> {new Date(event.date).toLocaleString()}
</Typography> </Typography>

View File

@@ -453,9 +453,24 @@ const RSVPForm: React.FC = () => {
{event.title} {event.title}
</Typography> </Typography>
{event.description && ( {event.description && (
<Typography variant="body2" color="text.secondary"> <>
<strong>Info:</strong> {event.description} <Typography variant="body2" color="text.secondary" gutterBottom>
<strong>Info:</strong>
</Typography> </Typography>
<Box
sx={{
pl: 2,
color: 'text.secondary',
fontSize: '0.875rem',
'& p': { marginBottom: 1 },
'& ul, & ol': { marginLeft: 2, marginBottom: 1 },
'& li': { marginBottom: 0.5 },
'& h1, & h2, & h3': { marginTop: 2, marginBottom: 1 },
'& a': { color: 'primary.main' },
}}
dangerouslySetInnerHTML={{ __html: event.description }}
/>
</>
)} )}
{event.description && <Divider sx={{ my: 2 }} />} {/* Separator after Info */} {event.description && <Divider sx={{ my: 2 }} />} {/* Separator after Info */}
<Box> {/* Grouping Date, Location, and Note */} <Box> {/* Grouping Date, Location, and Note */}