Skip to content

Commit

Permalink
Merge pull request #146 from techy1999/127-planning-to-create-a-dashb…
Browse files Browse the repository at this point in the history
…oard-menu

improved ui
  • Loading branch information
techy1999 authored May 16, 2024
2 parents 4fa01aa + 92d8cc6 commit 078ed27
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
7 changes: 4 additions & 3 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import SimpleSnackbar from "./common/SnackBar";
import { SNACKBAR_SEVERITY } from "../constants/common/all.constants";
import MenuIcon from "@mui/icons-material/Menu";
import CloseIcon from "@mui/icons-material/Close";

import HowToRegIcon from '@mui/icons-material/HowToReg';
import LogoutIcon from '@mui/icons-material/Logout';
const Header = () => {
// Media query for detecting small screens (mobile devices)
const isMobile = useMediaQuery("(max-width:600px)");
Expand Down Expand Up @@ -140,13 +141,13 @@ const Header = () => {
LinkComponent={Link}
to="/profile"
>
Profile
<HowToRegIcon color="white" fontSize="medium"/>
</Button>
<Button
sx={{ margin: 1, color: "white" }}
onClick={handleLogout}
>
Logout
<LogoutIcon color="white" fontSize="medium"/>
</Button>
</>
)}
Expand Down
30 changes: 16 additions & 14 deletions src/components/UserBlog.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { Card, useMediaQuery } from "@mui/material";
import { Card, Divider, useMediaQuery } from "@mui/material";

import CardHeader from "@mui/material/CardHeader";
import CardMedia from "@mui/material/CardMedia";
Expand All @@ -8,7 +8,7 @@ import CardActions from "@mui/material/CardActions";
import Avatar from "@mui/material/Avatar";
import IconButton, { IconButtonProps } from "@mui/material/IconButton";
import Typography from "@mui/material/Typography";
import { red } from "@mui/material/colors";
import { green, red } from "@mui/material/colors";
import DeleteIcon from "@mui/icons-material/Delete";
import EditIcon from "@mui/icons-material/Edit";
import axios from "axios";
Expand All @@ -20,7 +20,7 @@ import { Button, TextField } from "@mui/material";
import AlertContainer from "./common/AlertContainer";
import Tooltip from "@mui/material/Tooltip";
import ConfirmationModel from "./common/ConfirmationModel";

import CalendarMonthIcon from '@mui/icons-material/CalendarMonth';
export default function UserBlog({
title,
content,
Expand Down Expand Up @@ -147,33 +147,35 @@ export default function UserBlog({
},
}}
>
<Typography variant="h3" color="primary.main">
{title}
</Typography>
<CardHeader
avatar={
<Avatar sx={{ bgcolor: red[500] }} aria-label="recipe">
Date
</Avatar>
<CalendarMonthIcon sx={{ bgcolor: green[500] }} aria-label="recipe" />
}
subheader={createdAt}
title={`Create at 👉 ${createdAt} `}
sx={{padding:0}}
/>
<CardHeader
avatar={
<Avatar sx={{ bgcolor: red[500] }} aria-label="recipe">
Date
</Avatar>
<CalendarMonthIcon sx={{ bgcolor: green[500] }} aria-label="recipe">
</CalendarMonthIcon>
}
subheader={updatedAt}
title={`Create at 👉 ${updatedAt} `}
sx={{padding:0}}
/>

<Divider sx={{marginBottom:"10px" , marginTop:"10px"}}/>

<CardMedia
component="img"
height="194"
image={image}
alt="Paella dish"
/>
<CardContent>
<Typography variant="h4" color="text.primary">
{title}
</Typography>

<Typography
paragraph
color="text.secondary"
Expand Down

0 comments on commit 078ed27

Please sign in to comment.