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();
return (
<ArticleContainer>
<IconButton onClick={onBack} sx={{ mb: 2 }}>
<Box
sx={{
display: "flex",
justifyContent: "space-between",
mb: 2,
}}
>
<IconButton onClick={onBack}>
<ArrowBackRoundedIcon />
</IconButton>
{currentUser && (
<IconButton onClick={onEdit} sx={{ mb: 2 }}>
<IconButton onClick={onEdit}>
<EditRoundedIcon />
</IconButton>
)}
</Box>
<Typography variant="h3" component="h1" gutterBottom fontWeight="bold">
{article.title}