Skip to content

Instantly share code, notes, and snippets.

@dangdennis
Last active November 14, 2017 19:59
Show Gist options
  • Save dangdennis/e0bcf1dc8708716941195d5695e69edb to your computer and use it in GitHub Desktop.
Save dangdennis/e0bcf1dc8708716941195d5695e69edb to your computer and use it in GitHub Desktop.
The root component of my last, older application - Super Smash Stats. Highlights: the React environment, i.e. Redux, React-Router
// We're currently restructuring our application and organization structure. So naming convention and file structure will change dramatically later this year.
import React from "react";
import { Route, Switch } from "react-router-dom";
import Navbar from "./features/navbar";
import Landing from "./landing/landing";
import SearchResults from "./search_results/search_results";
import PlayerProfile from "./player_profile/player_profile";
import Head2HeadResults from "./h2h_results/head2head_results";
import ErrorPage from "./static_pages/error_page";
import Head2HeadProfile from "./h2h_profile/head2head_profile";
import CharacterSelect from "./character_select/character_select";
import Favicon from "react-favicon";
import Faq from "./static_pages/faq";
import "./css/animate.css";
import "./css/app.css";
export default () => (
<div>
<Favicon url="https://vignette3.wikia.nocookie.net/ssb/images/6/64/Favicon.ico/revision/latest?cb=20150114084035" />
<Route component={Navbar} />
<Switch>
<Route exact path="/" component={Landing} />
<Route path="/characterselect" component={CharacterSelect} />
<Route path="/results/:search/:id" component={SearchResults} />
<Route path="/player_profile/:id" component={PlayerProfile} />
<Route
path="/head2headresults/:id1/:search/:page"
component={Head2HeadResults}
/>
<Route
path="/head2headprofile/:id1/:id2"
component={Head2HeadProfile}
/>
<Route path="/faq" component={Faq} />
<Route path="/character_select_screen" component={CharacterSelect} />
<Route path="*" component={ErrorPage} />
</Switch>
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment