// src/store/index.js import { configureStore } from '@reduxjs/toolkit'; import communityDataReducer from './slices/communityDataSlice'; import posthogReducer from './slices/posthogSlice'; import industryReducer from './slices/industrySlice'; import posthogMiddleware from './middleware/posthogMiddleware'; export const store = configureStore({ reducer: { communityData: communityDataReducer, posthog: posthogReducer, // ✅ PostHog Redux 状态管理 industry: industryReducer, // ✅ 行业分类数据管理 }, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: { // 忽略这些 action types 的序列化检查 ignoredActions: [ 'communityData/fetchPopularKeywords/fulfilled', 'communityData/fetchHotEvents/fulfilled', 'posthog/trackEvent/fulfilled', // ✅ PostHog 事件追踪 ], }, }).concat(posthogMiddleware), // ✅ PostHog 自动追踪中间件 }); export default store;