Improvment in tslint standard (#16)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { PostActionType } from "constants/postActionType";
|
||||
import { PostActionType } from 'constants/postActionType'
|
||||
|
||||
/**
|
||||
* Post action interface
|
||||
|
||||
@@ -13,7 +13,7 @@ export class PostState {
|
||||
* @type {*}
|
||||
* @memberof PostState
|
||||
*/
|
||||
userPosts: any = {};
|
||||
userPosts: any = {}
|
||||
|
||||
/**
|
||||
* If user posts are loaded {true} or not {false}
|
||||
@@ -21,5 +21,5 @@ export class PostState {
|
||||
* @type {Boolean}
|
||||
* @memberof PostState
|
||||
*/
|
||||
loaded: Boolean = false;
|
||||
loaded: Boolean = false
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
import { postReducer } from "./postReducer";
|
||||
import { postReducer } from './postReducer'
|
||||
|
||||
export {postReducer};
|
||||
export {postReducer}
|
||||
@@ -1,15 +1,15 @@
|
||||
// - Import react components
|
||||
import moment from 'moment'
|
||||
import _ from 'lodash'
|
||||
import {Reducer, Action} from "redux";
|
||||
import {Reducer, Action} from 'redux'
|
||||
|
||||
|
||||
// - Import action types
|
||||
import { PostActionType } from "constants/postActionType";
|
||||
import { PostActionType } from 'constants/postActionType'
|
||||
|
||||
|
||||
import { PostState } from "./PostState";
|
||||
import { IPostAction } from "./IPostAction";
|
||||
import { PostState } from './PostState'
|
||||
import { IPostAction } from './IPostAction'
|
||||
|
||||
|
||||
/**
|
||||
@@ -17,8 +17,8 @@ import { IPostAction } from "./IPostAction";
|
||||
* @param {object} state
|
||||
* @param {object} action
|
||||
*/
|
||||
export var postReducer = (state : PostState = new PostState(), action : IPostAction) => {
|
||||
const { payload } = action;
|
||||
export let postReducer = (state : PostState = new PostState(), action : IPostAction) => {
|
||||
const { payload } = action
|
||||
switch (action.type) {
|
||||
case PostActionType.CLEAR_ALL_DATA_POST:
|
||||
return new PostState()
|
||||
@@ -93,7 +93,7 @@ export var postReducer = (state : PostState = new PostState(), action : IPostAct
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
return state
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user