summaryrefslogtreecommitdiffstats
path: root/webapp/routes/route_utils.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/routes/route_utils.jsx')
-rw-r--r--webapp/routes/route_utils.jsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/webapp/routes/route_utils.jsx b/webapp/routes/route_utils.jsx
new file mode 100644
index 000000000..f3a159cbc
--- /dev/null
+++ b/webapp/routes/route_utils.jsx
@@ -0,0 +1,20 @@
+// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import * as Utils from 'utils/utils.jsx';
+
+export function importComponentSuccess(callback) {
+ return (comp) => callback(null, comp.default);
+}
+
+export function createGetChildComponentsFunction(arrayOfComponents) {
+ return (locaiton, callback) => callback(null, arrayOfComponents);
+}
+
+export const notFoundParams = {
+ title: Utils.localizeMessage('error.not_found.title', 'Page not found'),
+ message: Utils.localizeMessage('error.not_found.message', 'The page you were trying to reach does not exist'),
+ link: '/',
+ linkmessage: Utils.localizeMessage('error.not_found.link_message', 'Back to Mattermost')
+};
+