Skip to content

Commit 3703237

Browse files
committed
structure final with redux
1 parent 3826e75 commit 3703237

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

src/Redux/store.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ const rootReducer = combineReducers(Reducers);
1313
const persistedReducer = persistReducer(persistConfig, rootReducer);
1414
export const store = createStore(persistedReducer, applyMiddleware(thunk));
1515
export const persistVar = persistStore(store);
16-
export const getStateFromSelector =selector=>useSelector(cs => cs[selector]);
16+
export const getStateFromSelector =selector=>useSelector(cs => cs[selector]);

src/asserts/gifs/sample.example

Whitespace-only changes.

src/asserts/icons/sample.example

Whitespace-only changes.

src/asserts/images/sample.example

Whitespace-only changes.

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import './index.css';
44
import App from './App';
55
import reportWebVitals from './reportWebVitals';
66
import {Provider} from "react-redux";
7-
import {persistVar, store} from "./Redux/store";
7+
import {persistVar, store} from "./redux/store";
88
import { PersistGate } from 'redux-persist/integration/react';
99
const root = ReactDOM.createRoot(document.getElementById('root'));
1010
root.render(

src/views/index.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,23 @@
55
* */
66
import React from 'react';
77
import {Helmet} from 'react-helmet';
8-
import {getStateFromSelector} from "../Redux/store";
9-
import {CURRENT_SESSION_STATE_REDUCER} from "../Redux/reducers";
8+
import {getStateFromSelector} from "../redux/store";
9+
import {CURRENT_SESSION_STATE_REDUCER} from "../redux/reducers";
10+
// import {setCurrentPageTitle} from "../redux/action";
11+
// import {useDispatch} from "react-redux";
1012

1113
const Application = () => {
14+
// const ds = useDispatch()
1215
const {pageTitle, pageName} = getStateFromSelector(CURRENT_SESSION_STATE_REDUCER);
1316
return (
1417
<>
1518
<Helmet>
1619
<title>{pageTitle}</title>
1720
</Helmet>
1821
<h1>This is {pageName}</h1>
22+
{/*<button title={"Click me"} onClick={()=>ds(setCurrentPageTitle("CHKCINF"))}>*/}
23+
{/* <h4>Click me</h4>*/}
24+
{/*</button>*/}
1925
</>
2026
);
2127
};

0 commit comments

Comments
 (0)