<commit_before>import React from "react";

import { Route, IndexRoute } from "react-router/es";
import willTransitionTo from "./routerTransition";
import Trusty from "./Trusty";
/*
* Electron does not support async loading of components via System.import,
* so we make sure they're bundled already by including them here
*/
if (__ELECTRON__ || __HASH_HISTORY__) {
    require("./electron_imports");
}

class Auth extends React.Component {
    render() {return null; }
}

function loadRoute(cb, moduleName = "default") {
    return (module) => cb(null, module[moduleName]);
}

function errorLoading(err) {
    console.error("Dynamic page loading failed", err);
}

const routes = (
    <Route path="/" component={Trusty} onEnter={willTransitionTo}>
        <IndexRoute getComponent={(location, cb) => {
            System.import("components/Trusty/Dashboard/DashboardContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/auth/:data" component={Auth}/>
        <Route path="/dashboard" getComponent={(location, cb) => {
            System.import("components/Dashboard/DashboardContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="explorer" getComponent={(location, cb) => {
            System.import("components/Explorer/Explorer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/fees" getComponent={(location, cb) => {
            System.import("components/Blockchain/FeesContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/blocks" getComponent={(location, cb) => {
            System.import("components/Explorer/BlocksContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/assets" getComponent={(location, cb) => {
            System.import("components/Explorer/AssetsContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/accounts" getComponent={(location, cb) => {
            System.import("components/Explorer/AccountsContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/witnesses" getComponent={(location, cb) => {
            System.import("components/Explorer/Witnesses").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/committee-members" getComponent={(location, cb) => {
            System.import("components/Explorer/CommitteeMembers").then(loadRoute(cb)).catch(errorLoading);
        }}/>

        <Route path="wallet" getComponent={(location, cb) => {
            System.import("components/Wallet/WalletManager").then(loadRoute(cb, "WalletManager")).catch(errorLoading);
        }}>
            {/* wallet management console */}
            <IndexRoute getComponent={(location, cb) => {
                System.import("components/Wallet/WalletManager").then(loadRoute(cb, "WalletOptions")).catch(errorLoading);
            }}/>
            <Route path="change" getComponent={(location, cb) => {
                System.import("components/Wallet/WalletManager").then(loadRoute(cb, "ChangeActiveWallet")).catch(errorLoading);
            }}/>
            <Route path="change-password" getComponent={(location, cb) => {
                System.import("components/Wallet/WalletChangePassword").then(loadRoute(cb)).catch(errorLoading);
            }}/>
            <Route path="import-keys" getComponent={(location, cb) => {
                System.import("components/Wallet/ImportKeys").then(loadRoute(cb, "ExistingAccountOptions")).catch(errorLoading);
            }}/>
            <Route path="brainkey" getComponent={(location, cb) => {
                System.import("components/Wallet/Brainkey").then(loadRoute(cb, "ExistingAccountOptions")).catch(errorLoading);
            }}/>
            <Route path="create" getComponent={(location, cb) => {
                System.import("components/Wallet/Trusty/WalletCreate").then(loadRoute(cb, "WalletCreate")).catch(errorLoading);
            }}/><commit_msg>Fix error in route<commit_after>import React from "react";

import { Route, IndexRoute } from "react-router/es";
import willTransitionTo from "./routerTransition";
import Trusty from "./Trusty";
/*
* Electron does not support async loading of components via System.import,
* so we make sure they're bundled already by including them here
*/
if (__ELECTRON__ || __HASH_HISTORY__) {
    require("./electron_imports");
}

class Auth extends React.Component {
    render() {return null; }
}

function loadRoute(cb, moduleName = "default") {
    return (module) => cb(null, module[moduleName]);
}

function errorLoading(err) {
    console.error("Dynamic page loading failed", err);
}

const routes = (
    <Route path="/" component={Trusty} onEnter={willTransitionTo}>
        <IndexRoute getComponent={(location, cb) => {
            System.import("components/Trusty/Dashboard/DashboardContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/auth/:data" component={Auth}/>
        <Route path="/dashboard" getComponent={(location, cb) => {
            System.import("components/Dashboard/DashboardContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="explorer" getComponent={(location, cb) => {
            System.import("components/Explorer/Explorer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/fees" getComponent={(location, cb) => {
            System.import("components/Blockchain/FeesContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/blocks" getComponent={(location, cb) => {
            System.import("components/Explorer/BlocksContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/assets" getComponent={(location, cb) => {
            System.import("components/Explorer/AssetsContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/accounts" getComponent={(location, cb) => {
            System.import("components/Explorer/AccountsContainer").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/witnesses" getComponent={(location, cb) => {
            System.import("components/Explorer/Witnesses").then(loadRoute(cb)).catch(errorLoading);
        }}/>
        <Route path="/explorer/committee-members" getComponent={(location, cb) => {
            System.import("components/Explorer/CommitteeMembers").then(loadRoute(cb)).catch(errorLoading);
        }}/>

        <Route path="wallet" getComponent={(location, cb) => {
            System.import("components/Wallet/WalletManager").then(loadRoute(cb, "WalletManager")).catch(errorLoading);
        }}>
            {/* wallet management console */}
            <IndexRoute getComponent={(location, cb) => {
                System.import("components/Wallet/WalletManager").then(loadRoute(cb, "WalletOptions")).catch(errorLoading);
            }}/>
            <Route path="change" getComponent={(location, cb) => {
                System.import("components/Wallet/WalletManager").then(loadRoute(cb, "ChangeActiveWallet")).catch(errorLoading);
            }}/>
            <Route path="change-password" getComponent={(location, cb) => {
                System.import("components/Wallet/WalletChangePassword").then(loadRoute(cb)).catch(errorLoading);
            }}/>
            <Route path="import-keys" getComponent={(location, cb) => {
                System.import("components/Wallet/ImportKeys").then(loadRoute(cb, "ExistingAccountOptions")).catch(errorLoading);
            }}/>
            <Route path="brainkey" getComponent={(location, cb) => {
                System.import("components/Wallet/Brainkey").then(loadRoute(cb, "ExistingAccountOptions")).catch(errorLoading);
            }}/>
            <Route path="create" getComponent={(location, cb) => {
                System.import("components/Trusty/Wallet/WalletCreate").then(loadRoute(cb, "WalletCreate")).catch(errorLoading);
            }}/>
{'fraction_non_alphanumeric': 0.16288019863438857, 'fraction_numerical': 0.0, 'mean_word_length': 3.3358449946178688, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2703332', 'n_tokens_mistral': 2200, 'n_tokens_neox': 2192, 'n_words': 323}