initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
//import "../styles/globals.css";
|
||||
import "../styles/sass/styles.scss";
|
||||
import Loading from "../components/loading";
|
||||
import { wrapper } from "../store/store";
|
||||
import { useStore } from "react-redux";
|
||||
import { persistStore } from "redux-persist";
|
||||
import { PersistGate } from "redux-persist/integration/react";
|
||||
|
||||
const MyApp = ({ Component, pageProps }) => {
|
||||
const store = useStore((state) => state);
|
||||
const persistor = persistStore(store, {}, function () {
|
||||
persistor.persist();
|
||||
});
|
||||
|
||||
return (
|
||||
<PersistGate persistor={store.__persistor} loading={<Loading />}>
|
||||
<Component {...pageProps} />
|
||||
</PersistGate>
|
||||
);
|
||||
};
|
||||
|
||||
export default wrapper.withRedux(MyApp);
|
||||
Reference in New Issue
Block a user