Refactor code style for consistency and readability
- Updated import statements to use double quotes instead of single quotes across multiple files. - Reformatted JSX return statements for better alignment and readability. - Added missing newlines at the end of files where necessary. - Adjusted component structure for improved clarity in the Landing, Blog, BestPractices, and Projects pages. - Enhanced error boundary component for better error handling. - Updated theme overrides for Material-UI components to maintain consistent styling.
This commit is contained in:
@@ -1,35 +1,37 @@
|
||||
import React from 'react';
|
||||
import React from "react";
|
||||
import {
|
||||
Accordion,
|
||||
AccordionSummary,
|
||||
AccordionDetails,
|
||||
Typography,
|
||||
} from '@mui/material';
|
||||
Accordion,
|
||||
AccordionSummary,
|
||||
AccordionDetails,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
|
||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
|
||||
const BlogAccordion = ({blogContent}) => {
|
||||
return (
|
||||
blogContent.map(({title, description}) => (
|
||||
<Accordion
|
||||
// defaultExpanded
|
||||
// slotProps={{ unmountOnExit: true }}
|
||||
key={title}
|
||||
sx={{ background: 'transparent' }}>
|
||||
<AccordionSummary
|
||||
expandIcon={<ExpandMoreIcon />}
|
||||
aria-controls='panel1a-content'
|
||||
id='panel1a-header'>
|
||||
<Typography variant='h5'>{ title }</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
{description.map((lineContent, idx) => (
|
||||
<Typography
|
||||
key={idx} paragraph>{lineContent}</Typography>
|
||||
))}
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
)));
|
||||
const BlogAccordion = ({ blogContent }) => {
|
||||
return blogContent.map(({ title, description }) => (
|
||||
<Accordion
|
||||
// defaultExpanded
|
||||
// slotProps={{ unmountOnExit: true }}
|
||||
key={title}
|
||||
sx={{ background: "transparent" }}
|
||||
>
|
||||
<AccordionSummary
|
||||
expandIcon={<ExpandMoreIcon />}
|
||||
aria-controls="panel1a-content"
|
||||
id="panel1a-header"
|
||||
>
|
||||
<Typography variant="h5">{title}</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
{description.map((lineContent, idx) => (
|
||||
<Typography key={idx} paragraph>
|
||||
{lineContent}
|
||||
</Typography>
|
||||
))}
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
));
|
||||
};
|
||||
|
||||
export default BlogAccordion;
|
||||
export default BlogAccordion;
|
||||
|
||||
Reference in New Issue
Block a user