code7-leia 0.1.71 → 0.1.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.tsx CHANGED
@@ -1,6 +1,8 @@
1
1
  import type { PropsWithChildren, ReactElement } from 'react';
2
+ import { Provider } from 'react-redux';
2
3
  import React from 'react';
3
4
  import { Leia } from './Leia';
5
+ import { store } from './store';
4
6
 
5
7
  export type Props = PropsWithChildren<{
6
8
  id: string;
@@ -10,5 +12,7 @@ export type Props = PropsWithChildren<{
10
12
  }>;
11
13
 
12
14
  export function Code7(props: Props) {
13
- return <Leia {...props} />;
15
+ return <Provider store={store}>
16
+ <Leia {...props} />
17
+ </Provider>;
14
18
  }
@@ -1,12 +1,14 @@
1
- import { createStore, combineReducers, applyMiddleware } from 'redux';
2
- import reduxPromise from 'redux-promise';
1
+ import { createStore } from 'redux';
2
+ // import { configureStore } from '@reduxjs/toolkit'
3
+ import { persistStore } from 'redux-persist';
3
4
  import FilesReducer from './modules/Files/Files.reducer';
4
- import { FileData } from '../interface/FileData'
5
+ // import { FileData } from '../interface/FileData'
5
6
 
6
- const rootReducer = combineReducers({
7
- files: FilesReducer as unknown as [FileData],
8
- });
7
+ // const rootReducer = combineReducers({
8
+ // files: FilesReducer as unknown as [FileData],
9
+ // });
9
10
 
10
- const store = createStore(rootReducer, applyMiddleware(reduxPromise));
11
+ const store = createStore(FilesReducer);
12
+ const persistor = persistStore(store);
11
13
 
12
- export { store };
14
+ export { store, persistor };