'use strict'; import React from 'react'; import { History } from 'react-router'; import { getLangText } from '../utils/lang_utils'; let ErrorNotFoundPage = React.createClass({ propTypes: { message: React.PropTypes.string }, mixins: [History], getDefaultProps() { return { message: getLangText("Oops, the page you are looking for doesn't exist.") }; }, componentDidMount() { // The previous page, if any, is the second item in the locationQueue const { locationQueue: [ , previousPage ] } = this.history; if (previousPage) { console.logGlobal('Page not found', { previousPath: previousPage.pathname }); } }, render() { return (
{this.props.message}