better masking and fix ui bug for live events

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-04-16 13:56:48 +02:00
parent a8346ed7d5
commit 8ec4cc2058
3 changed files with 18 additions and 5 deletions

View File

@@ -2,7 +2,6 @@
import { useState } from 'react';
import { EventListItem } from '@/app/(app)/[organizationSlug]/[projectId]/events/event-list-item';
import { ScrollArea } from '@/components/ui/scroll-area';
import useWS from '@/hooks/useWS';
import { AnimatePresence, motion } from 'framer-motion';
@@ -18,7 +17,7 @@ const LiveEvents = ({ events }: Props) => {
setState((p) => [event, ...p].slice(0, 30));
});
return (
<ScrollArea className="h-screen">
<div className="hide-scrollbar h-screen overflow-y-auto">
<div className="text-background-foreground py-16 text-center text-2xl font-bold">
Real time data
<br />
@@ -40,7 +39,7 @@ const LiveEvents = ({ events }: Props) => {
))}
</div>
</AnimatePresence>
</ScrollArea>
</div>
);
};

View File

@@ -156,3 +156,13 @@
.recharts-wrapper .recharts-cartesian-grid-horizontal line:last-child {
stroke-opacity: 0;
}
.hide-scrollbar::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}