<commit_before>/**
 * Root route config
 * @see https://react-router.now.sh/route-config
 */

import React from 'react';
import Router from 'react-router/BrowserRouter';
import Match from 'react-router/Match';

import Layout from 'components/Layout';
import Home from './Home';
import About from './About';


export const routes = [
  {
    pattern: '/',
    name: 'Home',
    exactly: true,
    component: Home
  },
  {
    pattern: '/about',
    name: 'About',
    component: About
  }
];


function AppRouter() {
  return (
    <Router>
      <Layout>
        {routes.map(route => (
          <Match
            key={route.pattern}
            pattern={route.pattern}
            exactly={route.exactly}
            component={route.component}
          />
        ))}
      </Layout>
    </Router>
  );
}


export default AppRouter;<commit_msg>add a home redirect<commit_after>/**
 * Root route config
 * @see https://react-router.now.sh/route-config
 */

import React from 'react';
import Router from 'react-router/BrowserRouter';
import Match from 'react-router/Match';
import Miss from 'react-router/Miss';
import Redirect from 'react-router/Redirect';

import Layout from 'components/Layout';
import Home from './Home';
import About from './About';


export const routes = [
  {
    pattern: '/',
    name: 'Home',
    exactly: true,
    component: Home
  },
  {
    pattern: '/about',
    name: 'About',
    component: About
  }
];


const HomeRedirect = () => <Redirect to="/" />;

function AppRouter() {
  return (
    <Router>
      <Layout>
        {routes.map(route => (
          <Match
            key={route.pattern}
            pattern={route.pattern}
            exactly={route.exactly}
            component={route.component}
          />
        ))}
        <Miss component={HomeRedirect} />
      </Layout>
    </Router>
  );
}


export default AppRouter;
{'fraction_non_alphanumeric': 0.14651038891848694, 'fraction_numerical': 0.0, 'mean_word_length': 2.3238938053097344, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 18, 'https://': 2, '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': '7617531', 'n_tokens_mistral': 558, 'n_tokens_neox': 556, 'n_words': 140}