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/dist/code7-leia.cjs.development.js +30 -29
- package/dist/code7-leia.cjs.development.js.map +1 -1
- package/dist/code7-leia.cjs.production.min.js +1 -1
- package/dist/code7-leia.cjs.production.min.js.map +1 -1
- package/dist/code7-leia.esm.js +31 -30
- package/dist/code7-leia.esm.js.map +1 -1
- package/dist/store/index.d.ts +7 -4
- package/package.json +4 -2
- package/src/Leia.tsx +1 -4
- package/src/index.tsx +5 -1
- package/src/store/index.ts +10 -8
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 <
|
|
15
|
+
return <Provider store={store}>
|
|
16
|
+
<Leia {...props} />
|
|
17
|
+
</Provider>;
|
|
14
18
|
}
|
package/src/store/index.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { createStore
|
|
2
|
-
import
|
|
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
|
-
|
|
8
|
-
});
|
|
7
|
+
// const rootReducer = combineReducers({
|
|
8
|
+
// files: FilesReducer as unknown as [FileData],
|
|
9
|
+
// });
|
|
9
10
|
|
|
10
|
-
const store = createStore(
|
|
11
|
+
const store = createStore(FilesReducer);
|
|
12
|
+
const persistor = persistStore(store);
|
|
11
13
|
|
|
12
|
-
export { store };
|
|
14
|
+
export { store, persistor };
|