Skip to content

Commit

Permalink
Merge pull request #1296 from DalgoT4D/fixing-notification-css
Browse files Browse the repository at this point in the history
fixing notification css.
  • Loading branch information
fatchat authored Nov 8, 2024
2 parents 09ca310 + eaaf20b commit 8c3cd1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Notifications/ManageNotificaitons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
IconButton,
} from '@mui/material';
import { ErrorOutline, KeyboardArrowDown, KeyboardArrowUp } from '@mui/icons-material';

const Long_Notification_Length = 130;
interface Notification {
id: number;
urgent: boolean;
Expand Down Expand Up @@ -134,7 +134,7 @@ const ManageNotifications = ({
>
<TableBody>
{data?.res?.map((notification: Notification) => {
const isMessageLong = notification.message.length > 100;
const isMessageLong = notification.message.length > Long_Notification_Length;

return (
<TableRow
Expand Down Expand Up @@ -186,11 +186,11 @@ const ManageNotifications = ({
color: notification.read_status ? '#798696' : '#0F2440E0',
}}
>
<Typography sx={{ fontWeight: 500, fontSize: '15px' }}>
<Typography sx={{ fontWeight: 700, fontSize: '15px' }}>
{/* Truncate the text only when it's not expanded */}
{expandedRow === notification.id
? notification.message
: truncateText(notification.message, 100)}
: truncateText(notification.message, Long_Notification_Length)}
</Typography>
<Typography sx={{ fontWeight: 600, fontSize: '12px' }}>
{moment(new Date(notification.timestamp)).fromNow()}
Expand Down

0 comments on commit 8c3cd1b

Please sign in to comment.