diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-09-05 17:40:35 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-09-05 17:40:35 -0400 |
commit | e30e4cfe3d787e2528419b0d17973eb0fc162d56 (patch) | |
tree | 8b6e989dccfe7308786167c0767f4699f28841ae /webapp/routes | |
parent | 6ca443a2556e5d4bade9a9ef7d6d877bf1d6fc45 (diff) | |
download | chat-e30e4cfe3d787e2528419b0d17973eb0fc162d56.tar.gz chat-e30e4cfe3d787e2528419b0d17973eb0fc162d56.tar.bz2 chat-e30e4cfe3d787e2528419b0d17973eb0fc162d56.zip |
PLT-7468 Moved more error pages to use predefined error types (#7378)
* PLT-7468 Moved more errors to use error types
* PLT-7468 Moved 404 error page to use error types
* Made helper function for rendering external links on error page
Diffstat (limited to 'webapp/routes')
-rw-r--r-- | webapp/routes/route_root.jsx | 2 | ||||
-rw-r--r-- | webapp/routes/route_utils.jsx | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/webapp/routes/route_root.jsx b/webapp/routes/route_root.jsx index f633049ce..8a1f440be 100644 --- a/webapp/routes/route_root.jsx +++ b/webapp/routes/route_root.jsx @@ -120,7 +120,7 @@ export default { { path: 'error', getComponents: (location, callback) => { - System.import('components/error_page.jsx').then(RouteUtils.importComponentSuccess(callback)); + System.import('components/error_page').then(RouteUtils.importComponentSuccess(callback)); } }, { diff --git a/webapp/routes/route_utils.jsx b/webapp/routes/route_utils.jsx index c5d889017..17fdc291d 100644 --- a/webapp/routes/route_utils.jsx +++ b/webapp/routes/route_utils.jsx @@ -1,8 +1,8 @@ // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as Utils from 'utils/utils.jsx'; import UserStore from 'stores/user_store.jsx'; +import {ErrorPageTypes} from 'utils/constants.jsx'; export function importComponentSuccess(callback) { return (comp) => callback(null, comp.default); @@ -13,10 +13,7 @@ export function createGetChildComponentsFunction(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') + type: ErrorPageTypes.PAGE_NOT_FOUND }; const mfaPaths = [ |