back and edit button spaced out properly

This commit is contained in:
2025-11-18 15:23:08 +05:30
parent 0340e17467
commit 383b424bdf

View File

@@ -34,15 +34,23 @@ export default function ArticleView({
const { currentUser } = useAuth(); const { currentUser } = useAuth();
return ( return (
<ArticleContainer> <ArticleContainer>
<IconButton onClick={onBack} sx={{ mb: 2 }}> <Box
sx={{
display: "flex",
justifyContent: "space-between",
mb: 2,
}}
>
<IconButton onClick={onBack}>
<ArrowBackRoundedIcon /> <ArrowBackRoundedIcon />
</IconButton> </IconButton>
{currentUser && ( {currentUser && (
<IconButton onClick={onEdit} sx={{ mb: 2 }}> <IconButton onClick={onEdit}>
<EditRoundedIcon /> <EditRoundedIcon />
</IconButton> </IconButton>
)} )}
</Box>
<Typography variant="h3" component="h1" gutterBottom fontWeight="bold"> <Typography variant="h3" component="h1" gutterBottom fontWeight="bold">
{article.title} {article.title}