<commit_before>import React from 'react';

/**
 * component displayed when user navigates to a
 * route that does not exist
 * @function NotFound
 * @returns {object} NotFound component
 */
const NotFound = () =>
  (
    <div className="error-404" />
  );

export default NotFound;
<commit_msg>[fix]: add navigation buttons to 404 error page<commit_after>import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';

/**
 * component displayed when user navigates to a
 * route that does not exist
 * @function NotFound
 * @returns {object} NotFound component
 */
export const NotFound = ({ isAuthenticated }) => {
  const buttonText = (isAuthenticated) ?
  'Back to Dashboard' : 'Back to Homepage';
  const location = (isAuthenticated) ?
  '/dashboard' : '/';
  return (
    <div className="error-404">
      <a
        className="waves-effect waves-light btn"
        href={location}
      >{buttonText}</a>
    </div>
  );
};

NotFound.propTypes = {
  isAuthenticated: PropTypes.bool.isRequired
};

const mapStateToProps = state => ({
  isAuthenticated: state.auth.isAuthenticated
});

export default connect(mapStateToProps)(NotFound);

{'fraction_non_alphanumeric': 0.12701100762066045, 'fraction_numerical': 0.007620660457239628, 'mean_word_length': 3.8641975308641974, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 11, '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': '6713877', 'n_tokens_mistral': 357, 'n_tokens_neox': 349, 'n_words': 104}