mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-23 00:33:46 +02:00
Add support for flash messages utilizing redux
This commit is contained in:
14
resources/scripts/redux/configure.ts
Normal file
14
resources/scripts/redux/configure.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { createStore } from 'redux';
|
||||
import { persistStore, persistReducer, PersistConfig } from 'redux-persist';
|
||||
import storage from 'redux-persist/lib/storage';
|
||||
import { reducers } from './reducers';
|
||||
|
||||
const persistConfig: PersistConfig = {
|
||||
key: 'root',
|
||||
storage,
|
||||
};
|
||||
|
||||
const persistedReducer = persistReducer(persistConfig, reducers);
|
||||
|
||||
export const store = createStore(persistedReducer);
|
||||
export const persistor = persistStore(store);
|
||||
Reference in New Issue
Block a user