<commit_before>// @flow
import * as React from 'react';
import { Route, Switch } from 'react-router-dom';
import ContactRoute from './ContactRoute';
import PageNotFoundRoute from '../pageNotFound/PageNotFoundRoute';

const contactRoute = ({ match }: { match: { path: string } }) => (
  <Switch>
    <Route exact path={`${match.path}`} component={ContactRoute} />
    <Route component={PageNotFoundRoute} />
  </Switch>
);

export default function Contact() {
  return <Route path="/contact" component={contactRoute} />;
}<commit_msg>Fix user state in contact form<commit_after>// @flow
import * as React from 'react';
import { Route, Switch } from 'react-router-dom';
import ContactRoute from './ContactRoute';
import RouteWrapper from 'app/components/RouteWrapper';
import { UserContext } from 'app/routes/app/AppRoute';
import PageNotFoundRoute from '../pageNotFound/PageNotFoundRoute';

const contactRoute = ({ match }: { match: { path: string } }) => (
  <UserContext.Consumer>
    {({ currentUser, loggedIn }) => (
      <Switch>
        <RouteWrapper
          exact
          path={`${match.path}`}
          Component={ContactRoute}
          passedProps={{ currentUser, loggedIn }}
        />
        <Route component={PageNotFoundRoute} />
      </Switch>
    )}
  </UserContext.Consumer>
);

export default function Contact() {
  return <Route path="/contact" component={contactRoute} />;
}
{'fraction_non_alphanumeric': 0.15203426124197003, 'fraction_numerical': 0.0, 'mean_word_length': 3.752542372881356, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 18, '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': '7191274', 'n_tokens_mistral': 384, 'n_tokens_neox': 385, 'n_words': 104}