<commit_before>import React from 'react';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { mount } from 'react-mounter';

import { MainContainer } from '/imports/containers/MainContainer.jsx';
import { PostContainer } from '/imports/containers/PostContainer.jsx';
import { FeedContainer } from '/imports/containers/FeedContainer.jsx';

import { NewPost } from '/imports/components/posts/NewPost.jsx';

const scrollToTop = () => {
  $('html, body').stop().animate({ scrollTop: 0 }, 300);
};

// Post Routes
const postsRoutes = FlowRouter.group({
  name: 'posts',
});

postsRoutes.route('/new', {
  name: 'newPost',
  triggersEnter: [scrollToTop],
  action() {
    mount(MainContainer, {<commit_msg>route to home if not photo in Session<commit_after>import React from 'react';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { mount } from 'react-mounter';

import { MainContainer } from '/imports/containers/MainContainer.jsx';
import { PostContainer } from '/imports/containers/PostContainer.jsx';
import { FeedContainer } from '/imports/containers/FeedContainer.jsx';

import { NewPost } from '/imports/components/posts/NewPost.jsx';

const scrollToTop = () => {
  $('html, body').stop().animate({ scrollTop: 0 }, 300);
};

// Post Routes
const postsRoutes = FlowRouter.group({
  name: 'posts',
});

postsRoutes.route('/new', {
  name: 'newPost',
  triggersEnter: [scrollToTop],
  action() {
    if (!Session.get('newPhoto')) {
      return FlowRouter.go('/');
    }

    mount(MainContainer, {
{'fraction_non_alphanumeric': 0.16317169069462648, 'fraction_numerical': 0.005242463958060288, 'mean_word_length': 4.697761194029851, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '813571', 'n_tokens_mistral': 503, 'n_tokens_neox': 487, 'n_words': 109}