<commit_before>// @flow

import type {FluxReduceStore} from 'flux/utils';
import type {SectionType} from '../enums/Section.js';

import {Container} from 'flux/utils';
import AboutProjectController from './AboutProjectController.jsx'
import AboutUsController from './AboutUsController.jsx'
import CreateProjectController from './CreateProjectController.jsx'
import EditProjectController from './EditProjectController.jsx'
import FindProjectsController  from './FindProjectsController.jsx'
import LandingController from './LandingController.jsx'
import MyProjectsController from './MyProjectsController.jsx'
import NavigationStore from '../stores/NavigationStore.js'
import React from 'react';
import Section from '../enums/Section.js'
import LogInController from './LogInController.jsx'
import SignUpController from './SignUpController.jsx'
import ResetPasswordController from "./ResetPasswordController.jsx";
import ChangePasswordController from "./ChangePasswordController.jsx";
import EditProfileController from "./EditProfileController.jsx";
import AboutUserController from "./AboutUserController.jsx";
import SignedUpController from "./SignedUpController.jsx";
import EmailVerifiedController from "./EmailVerifiedController.jsx";
import PartnerWithUsController from "./PartnerWithUsController.jsx";
import FlashMessage from "../chrome/FlashMessage.jsx";
import DonateController from "./DonateController.jsx";
import ThankYouController from "./ThankYouController.jsx";
import PressController from './PressController.jsx';
import ContactUsController from './ContactUsController.jsx';
import CreateGroupController from './CreateGroupController.jsx';
import CreateEventController from './CreateEventController.jsx';
import MyGroupsController from './MyGroupsController.jsx';
import LiveEventController from "./LiveEventController.jsx";
import AboutEventController from "./AboutEventController.jsx";
import AboutGroupController from "./AboutGroupController.jsx";
import ErrorController from "./ErrorController.jsx";
import FindGroupsController from "./FindGroupsController.jsx";
import FindEventsController from "./FindEventsController.jsx";

type State = {|
  section: SectionType,
|};

class SectionController extends React.Component<{||}, State> {
  static getStores(): $ReadOnlyArray<FluxReduceStore> {
    return [NavigationStore];
  }

  static calculateState(prevState: State): State {
    return {
      section: NavigationStore.getSection(),
    };
  }

  render(): React$Node {
    return (
      <div className="SectionBody" style={{ paddingTop: this.props.headerHeight }}>
        <FlashMessage key='flash_message'/>
        {this._getController()}
      </div>
    );
  }

  _getController(): React$Node {
    switch (this.state.section) {
      case Section.AboutProject:
        return <AboutProjectController />;
      case Section.AboutUs:
        return <AboutUsController />;
      case Section.CreateProject:
        return <CreateProjectController />;
      case Section.EditProject:
        return <EditProjectController />;
      case Section.FindProjects:
        return <FindProjectsController />;
      case Section.FindGroups:
        return <FindGroupsController />;
      case Section.FindEvents:<commit_msg>Redirect Edit Project url to Create Project workflow<commit_after>// @flow

import type {FluxReduceStore} from 'flux/utils';
import type {SectionType} from '../enums/Section.js';

import {Container} from 'flux/utils';
import AboutProjectController from './AboutProjectController.jsx'
import AboutUsController from './AboutUsController.jsx'
import CreateProjectController from './CreateProjectController.jsx'
import EditProjectController from './EditProjectController.jsx'
import FindProjectsController  from './FindProjectsController.jsx'
import LandingController from './LandingController.jsx'
import MyProjectsController from './MyProjectsController.jsx'
import NavigationStore from '../stores/NavigationStore.js'
import React from 'react';
import Section from '../enums/Section.js'
import LogInController from './LogInController.jsx'
import SignUpController from './SignUpController.jsx'
import ResetPasswordController from "./ResetPasswordController.jsx";
import ChangePasswordController from "./ChangePasswordController.jsx";
import EditProfileController from "./EditProfileController.jsx";
import AboutUserController from "./AboutUserController.jsx";
import SignedUpController from "./SignedUpController.jsx";
import EmailVerifiedController from "./EmailVerifiedController.jsx";
import PartnerWithUsController from "./PartnerWithUsController.jsx";
import FlashMessage from "../chrome/FlashMessage.jsx";
import DonateController from "./DonateController.jsx";
import ThankYouController from "./ThankYouController.jsx";
import PressController from './PressController.jsx';
import ContactUsController from './ContactUsController.jsx';
import CreateGroupController from './CreateGroupController.jsx';
import CreateEventController from './CreateEventController.jsx';
import MyGroupsController from './MyGroupsController.jsx';
import LiveEventController from "./LiveEventController.jsx";
import AboutEventController from "./AboutEventController.jsx";
import AboutGroupController from "./AboutGroupController.jsx";
import ErrorController from "./ErrorController.jsx";
import FindGroupsController from "./FindGroupsController.jsx";
import FindEventsController from "./FindEventsController.jsx";

type State = {|
  section: SectionType,
|};

class SectionController extends React.Component<{||}, State> {
  static getStores(): $ReadOnlyArray<FluxReduceStore> {
    return [NavigationStore];
  }

  static calculateState(prevState: State): State {
    return {
      section: NavigationStore.getSection(),
    };
  }

  render(): React$Node {
    return (
      <div className="SectionBody" style={{ paddingTop: this.props.headerHeight }}>
        <FlashMessage key='flash_message'/>
        {this._getController()}
      </div>
    );
  }

  _getController(): React$Node {
    switch (this.state.section) {
      case Section.AboutProject:
        return <AboutProjectController />;
      case Section.AboutUs:
        return <AboutUsController />;
      case Section.CreateProject:
        return <CreateProjectController />;
      case Section.EditProject:
        return <CreateProjectController />;
      case Section.FindProjects:
        return <FindProjectsController />;
      case Section.FindGroups:
        return <FindGroupsController />;
      case Section.FindEvents:
{'fraction_non_alphanumeric': 0.10563488407799786, 'fraction_numerical': 0.0, 'mean_word_length': 5.009225092250922, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '2397167', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1631, 'n_words': 428}