added in right hand nav and titles to store

This commit is contained in:
2021-07-14 12:17:45 +01:00
parent f5a0ec2021
commit eab46701e3
17 changed files with 1088 additions and 339 deletions
+12 -10
View File
@@ -2,21 +2,23 @@
import "../styles/sass/styles.scss";
import Loading from "../components/loading";
import { wrapper } from "../store/store";
import { useStore } from "react-redux";
import { useStore, Provider } 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();
});
const store = useStore((state) => state);
const persistor = persistStore(store, {}, function () {
persistor.persist();
});
return (
<PersistGate persistor={store.__persistor} loading={<Loading />}>
<Component {...pageProps} />
</PersistGate>
);
return (
<Provider store={store}>
<PersistGate persistor={store.__persistor} loading={<Loading />}>
<Component {...pageProps} />
</PersistGate>
</Provider>
);
};
export default wrapper.withRedux(MyApp);