Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Report Portal. If not, see .
*/
import { Module } from 'cerebral';
import Router from '@cerebral/router';
import changePage from './factories/changePage';
import notAutenticate from './factories/notAutenticate';
import autenticate from './factories/autenticate';
import initialData from './factories/initialData';
import loginPageDataLoad from './factories/loginPageDataLoad';
import registrationTokenData from './factories/registrationTokenData';
export const route = Module({
state: {
currentPage: '',
pageParams: {},
},
signals: {
loginRouted: initialData(notAutenticate(loginPageDataLoad(changePage('login')))),
forgotPassRouted: initialData(notAutenticate(loginPageDataLoad(changePage('forgotPass')))),
appRouted: initialData(autenticate(changePage('app'))),
registrationRouted: registrationTokenData(changePage('registration')),
},
});
export default Router({
routes: [
{
path: '/',
import { Module, Controller } from 'cerebral';
import FormsProvider from '@cerebral/forms';
import HttpProvider from '@cerebral/http';
import NotificationProvider from './providers/notification';
import modules from './modules/modules';
const Devtools = (
process.env.NODE_ENV === 'production' ? null : require('cerebral/devtools').default
);
const rootModule = Module({
modules,
providers: {
forms: FormsProvider({}),
http: HttpProvider({}),
notification: NotificationProvider,
},
state: {
hasLoadedInitialData: false,
lang: 'en',
},
signals: {
},
});
export default Controller(rootModule, {
devtools: Devtools && Devtools({