Skip to content

Commit

Permalink
fixed toast width
Browse files Browse the repository at this point in the history
  • Loading branch information
mishramonalisha76 committed Oct 3, 2024
1 parent 73a70f8 commit a1b7177
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
8 changes: 7 additions & 1 deletion src/blocks/notification/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ const NotificationContainer = styled.div`
width: -webkit-fill-available;
}
`;
const StyledToaster = styled(Toaster)`
width: 397px;
@media${deviceMediaQ.mobileL} {
width: 100%;
}
`;
const TextContainer = styled.div`
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -98,7 +104,7 @@ const NotificationItem: FC<NotificationProps> = ({ overlay, onClose, title, desc

const Notification = () => {
return (
<Toaster
<StyledToaster
offset={15}
visibleToasts={5}
/>
Expand Down
14 changes: 5 additions & 9 deletions src/common/hooks/useInAppNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ export const useInAppNotifications = () => {
userPushSDKInstance?.stream?.uid,
userPushSDKInstance?.stream
);
// notification.show({
// overlay: <InAppNotifications notificationDetails={data} />,
// });
notification.show({
title: 'Push Points are Live',
description: 'Complete Tasks on Push. Check-in, Earn Push Points, Unlock Rewards and Level up!',
image: <RewardPoints />,
overlay: <InAppNotifications notificationDetails={data} />,
});
// setTimeout(() => {
// notification.hide();
// }, 5000);

setTimeout(() => {
notification.hide();
}, 5000);
});
};

Expand Down

0 comments on commit a1b7177

Please sign in to comment.