mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 02:12:53 +00:00
beautified
This commit is contained in:
@@ -2,7 +2,7 @@ import * as types from "./constants";
|
||||
import marked from 'marked';
|
||||
import 'whatwg-fetch';
|
||||
|
||||
export function increasePostLimit(){
|
||||
export function increasePostLimit() {
|
||||
return {
|
||||
type: types.INCREASE_POST_LIMIT
|
||||
}
|
||||
@@ -15,15 +15,15 @@ function initPreview(posts) {
|
||||
}
|
||||
}
|
||||
|
||||
function loadPost(post){
|
||||
function loadPost(post) {
|
||||
return {
|
||||
type: types.LOAD_POST,
|
||||
post
|
||||
type: types.LOAD_POST,
|
||||
post
|
||||
}
|
||||
}
|
||||
|
||||
function fetching(){
|
||||
return{
|
||||
function fetching() {
|
||||
return {
|
||||
type: types.FETCHING
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//constants
|
||||
export const INCREASE_POST_LIMIT = 'INCREASE_POST_LIMIT';
|
||||
export const INIT_PREVIEW = 'INIT_PREVIEW';
|
||||
export const FILTER_PREVIEW = 'FILTER_PREVIEW';
|
||||
export const LOAD_POST = 'LOAD_POST';
|
||||
export const FETCHING = 'FETCHING';
|
||||
export const INCREASE_POST_LIMIT = 'INCREASE_POST_LIMIT';
|
||||
export const FILTER_PREVIEW = 'FILTER_PREVIEW';
|
||||
export const LOAD_POST = 'LOAD_POST';
|
||||
@@ -1,10 +1,6 @@
|
||||
//just using one reducer - use combineReducers from redux to modularize things
|
||||
import {
|
||||
combineReducers
|
||||
} from 'redux';
|
||||
import {
|
||||
routerReducer
|
||||
} from 'react-router-redux';
|
||||
import {combineReducers} from 'redux';
|
||||
import {routerReducer} from 'react-router-redux';
|
||||
|
||||
//import typs
|
||||
import * as types from './constants';
|
||||
@@ -38,12 +34,12 @@ function reducer(state = defaultState, action) {
|
||||
});
|
||||
case types.FETCHING:
|
||||
return Object.assign({}, state, {
|
||||
fetched : false,
|
||||
fetched: false,
|
||||
fetching: true
|
||||
});
|
||||
case types.INCREASE_POST_LIMIT:
|
||||
return Object.assign({}, state, {
|
||||
postLimit : state.postLimit + 10
|
||||
postLimit: state.postLimit + 10
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {applyMiddleware, createStore} from 'redux';
|
||||
import {syncHistoryWithStore} from 'react-router-redux';
|
||||
import {browserHistory} from 'react-router';
|
||||
import thunk from 'redux-thunk';
|
||||
import logger from 'redux-logger';
|
||||
import thunk from 'redux-thunk';
|
||||
import {applyMiddleware, createStore} from 'redux';
|
||||
import {browserHistory} from 'react-router';
|
||||
import {syncHistoryWithStore} from 'react-router-redux';
|
||||
|
||||
import reducers from './reducers';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user