Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const AppReducer = combineReducers({
navigation : NavigationReducer,
articles : ArticlesReducer,
content : ContentReducer,
upload : UploadReducer,
login : LoginReducer,
users : UsersReducer,
classify : ClassifyReducer,
about : AboutReducer,
msg : MsgBoardReducer,
github : GithubReducer,
sys_log : SysLogReducer,
access_log : AccessLogReducer,
form : formReducer,
router: routerReducer,
notifications: notificationsReducer()
});
export default AppReducer
import {combineReducers} from 'redux'
import {reducer as notificationsReducer} from 'reapop';
import soundcloud from "./soundcloud";
import imgurscraper from "./imgurscraper";
import ffmpeg from "./ffmpeg";
import global from './global'
import wget from "./wget";
import youtube_dl from "./youtubedl"
import download_manager from "./download_manager";
const todoApp = combineReducers({
notifications: notificationsReducer(),
soundcloud: soundcloud,
ffmpeg: ffmpeg,
global: global,
wget: wget,
youtube_dl: youtube_dl,
download_manager: download_manager
});
export default todoApp
/**
* Incrementing this triggers an upgrade process
* where the user has to enter their password, critical state is migrated
* and other state is regenerated.
* @type {number}
*/
export const CURRENT_VERSION: number = 18
const AppReducer = combineReducers({
account: AccountReducer,
auth: AuthReducer,
apps: AppsReducer,
profiles: ProfilesReducer,
sanity: SanityReducer,
settings: SettingsReducer,
notifications: makeNotificationsReducer()
})
function reducer(state: any, action: any) {
let newState: any = Object.assign({}, state)
if (action.type === UPDATE_STATE) {
const initialState = AppReducer(undefined, {})
const preservedApiSettingsState = {
gaiaHubUrl: state.settings.api.gaiaHubUrl,
distinctEventId: state.settings.api.distinctEventId,
hasDisabledEventTracking: state.settings.api.hasDisabledEventTracking
}
const newApiSettingsState = Object.assign(DEFAULT_API, preservedApiSettingsState)
newState = Object.assign({}, initialState, {
import pub from './publicReducer'
import user from './userReducer'
const appReducer = combineReducers({
people,
faces,
albums,
util,
photos,
auth,
search,
routerReducer,
ui,
pub,
user,
notifications: notificationsReducer()
})
export default (state,action) => {
if (action.type === 'LOGOUT') {
state = {}
}
return appReducer(state,action)
}
export const isAuthenticated =
state => fromAuth.isAuthenticated(state.auth)
export const accessToken =
state => fromAuth.accessToken(state.auth)
export const isAccessTokenExpired =
export const makeRootReducer = (asyncReducers) => {
return combineReducers({
notifications: notificationsReducer(),
location: locationReducer,
app: appReducer,
...asyncReducers
})
}