mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Настроил css модули
This commit is contained in:
13
src/index.js
13
src/index.js
@@ -3,9 +3,15 @@ import 'babel-polyfill';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import { createStore, combineReducers } from 'redux';
|
||||
import { createStore, combineReducers, applyMiddleware } from 'redux';
|
||||
import { Provider as ReduxProvider } from 'react-redux';
|
||||
|
||||
// midleware, который позволяет возвращать из экшенов функции
|
||||
// это полезно для работы с асинхронными действиями,
|
||||
// а также дает возможность проверить какие-либо условия перед запуском экшена
|
||||
// или даже вообще его не запускать в зависимости от условий
|
||||
import thunk from 'redux-thunk';
|
||||
|
||||
import { Router, browserHistory } from 'react-router';
|
||||
import { syncReduxAndRouter, routeReducer } from 'redux-simple-router';
|
||||
|
||||
@@ -18,7 +24,10 @@ const reducer = combineReducers({
|
||||
...reducers,
|
||||
routing: routeReducer
|
||||
});
|
||||
const store = createStore(reducer);
|
||||
|
||||
const store = applyMiddleware(
|
||||
thunk
|
||||
)(createStore)(reducer);
|
||||
|
||||
syncReduxAndRouter(browserHistory, store);
|
||||
|
||||
|
3
src/index.scss
Normal file
3
src/index.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.testClass {
|
||||
background: #f00;
|
||||
}
|
@@ -4,6 +4,8 @@ import { Link } from 'react-router';
|
||||
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import styles from 'index.scss';
|
||||
|
||||
function CoreLayout(props) {
|
||||
return (
|
||||
<div>
|
||||
@@ -23,7 +25,7 @@ function HomeView() {
|
||||
return (
|
||||
<div>
|
||||
Home!
|
||||
<Link to="/auth">Auth</Link>
|
||||
<Link className={styles.testClass} to="/auth">Auth</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user