You've already forked DataMate
Integrated Redux for state management with auth and settings slices. (#117)
* feat: Implement DatasetFileTransfer component for file selection and management * feat: Add pagination support to file list in Overview component * feat: add DatasetFileTransfer and TagManagement components - Added DatasetFileTransfer component for managing dataset files. - Introduced TagManagement component for handling tags. - Integrated Redux for state management with auth and settings slices. - Updated package.json to include @reduxjs/toolkit and react-redux dependencies. - Refactored existing components to utilize new DatasetFileTransfer and TagManagement components. - Implemented hooks for typed dispatch and selector in Redux. - Enhanced CreateKnowledgeBase and SynthesisTask components to support new features.
This commit is contained in:
15
frontend/src/store/index.ts
Normal file
15
frontend/src/store/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { configureStore } from "@reduxjs/toolkit";
|
||||
import authSlice from "./slices/authSlice";
|
||||
import settingsSlice from "./slices/settingsSlice";
|
||||
|
||||
// 创建 Store
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
auth: authSlice,
|
||||
settings: settingsSlice,
|
||||
},
|
||||
});
|
||||
|
||||
// 导出类型
|
||||
export type RootState = ReturnType<typeof store.getState>;
|
||||
export type AppDispatch = typeof store.dispatch;
|
||||
Reference in New Issue
Block a user