Skip to content

Commit

Permalink
Small style tweak to notifications to not show bottom border on singl…
Browse files Browse the repository at this point in the history
…e notification
  • Loading branch information
tomlynchRNA committed Jun 20, 2024
1 parent e19ff6c commit c26c9ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/src/components/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const Markdown = dynamic(() => import('react-markdown'), {
ssr: false,
});

export function Notification({ title, description, date, seen, _id, markSeen }) {
export function Notification({ index, title, description, date, seen, _id, markSeen }) {
const [gone, setGone] = useState(false);
return (
<div className={`p-4 border-b ${seen ? 'bg-gray-100' : 'bg-white'} transition-all duration-500 max-h-[500px] overflow-hidden ${gone ? 'max-h-0 opacity-0' : ''}`}>
<div className={`p-4 ${index === 0 ? '' : 'border-t'} ${seen ? 'bg-gray-100' : 'bg-white'} transition-all duration-500 max-h-[500px] overflow-hidden ${gone ? 'max-h-0 opacity-0' : ''}`}>
{!seen && <div className='ml-3 flex h-7 items-center cursor-pointer rounded-full right-5 absolute w-4 h-4'>
<button
type='button'
Expand Down Expand Up @@ -46,7 +46,7 @@ export function NotificationBox({ notifications }) {
return (
<div className='max-w-sm max-h-20 w-full bg-white shadow-md rounded-lg overflow-hidden'>
{notifications.slice(0, 5).map((notification, index) => (
<Notification key={index} {...notification} />
<Notification key={index} index={index} {...notification} />
))}
</div>
);
Expand Down

0 comments on commit c26c9ef

Please sign in to comment.