Fix duplicate event filtering in EventFeed
The EventFeed component was filtering events twice: 1. First in useEvents hook (backend query with event_types filter) 2. Then again in EventFeed component (client-side filter) This caused filter issues where switching between filters would show incorrect events (e.g., switching from SESSIONS to ALL would only show session events). Fixed by removing the duplicate client-side filter, as useEvents already provides correctly filtered events from the backend. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,11 +26,8 @@ export const EventFeed: React.FC<EventFeedProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const [activeTab, setActiveTab] = useState<'feed' | 'graph'>('feed');
|
const [activeTab, setActiveTab] = useState<'feed' | 'graph'>('feed');
|
||||||
|
|
||||||
// Filter events by active filter
|
// Events are already filtered by useEvents hook, no need to filter again
|
||||||
const filteredEvents = events.filter((event) => {
|
const filteredEvents = events;
|
||||||
const allowedTypes: EventType[] = EVENT_FILTER_MAP[activeFilter];
|
|
||||||
return allowedTypes.includes(event.event_type);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Scroll handler for infinite scroll
|
// Scroll handler for infinite scroll
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user