Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as preferences from './namespaces/preferences';
// import * as profile from './namespaces/profile';
import * as server from './namespaces/server';
// import * as userNotifications from './namespaces/userNotifications';
import * as workspace from './namespaces/workspace';
import { onInitialize } from './onInitialize';
import { state } from './state';
export const config = merge(
{
onInitialize,
effects,
state,
actions,
},
namespaced({
preferences,
// userNotifications,
// patron,
editor,
// live,
// workspace,
// dashboard,
// deployment,
files,
// git,
explore,
// profile,
server,
modals: createModals(modals),
})
);
import { IConfig } from 'overmind'
import { merge, namespaced } from 'overmind/config'
import state from './state'
import onInitialize from './onInitialize'
import * as actions from './actions'
import * as effects from './effects'
import { createHook } from 'overmind-react'
export const config = merge(
{
onInitialize,
state,
actions,
effects,
},
namespaced({
foo: {
actions: {
foo: () => {},
},
},
})
)
declare module 'overmind' {
interface Config extends IConfig {}
}
export const useOvermind = createHook()
import * as preferences from './namespaces/preferences';
import * as profile from './namespaces/profile';
import * as server from './namespaces/server';
import * as userNotifications from './namespaces/userNotifications';
import * as workspace from './namespaces/workspace';
import { onInitialize } from './onInitialize';
import { state } from './state';
export const config = merge(
{
onInitialize,
effects,
state,
actions,
},
namespaced({
preferences,
userNotifications,
patron,
editor,
live,
workspace,
dashboard,
dashboard_new,
deployment,
files,
git,
explore,
profile,
server,
modals: createModals(modals),
})
export default ({
namespaces,
settings
}: {
namespaces: { [key: string]: Namespace };
settings: Settings;
}) =>
namespaced(
Object.entries(namespaces).reduce(
(config, [namespace, module]) => {
if (module.Store) config[namespace] = module.Store;
return config;
},
{ settings }
)
);