2018-07-02 14:50:13 +02:00
|
|
|
//@flow
|
2018-07-11 14:59:01 +02:00
|
|
|
import React from "react";
|
2018-07-02 14:50:13 +02:00
|
|
|
|
2018-07-11 14:59:01 +02:00
|
|
|
import { Route, withRouter } from "react-router";
|
2018-07-02 14:50:13 +02:00
|
|
|
|
2018-07-11 14:59:01 +02:00
|
|
|
import Repositories from "../repositories/containers/Repositories";
|
|
|
|
|
import Users from "../users/containers/Users";
|
2018-07-12 11:35:28 +02:00
|
|
|
|
2018-07-11 14:59:01 +02:00
|
|
|
import { Switch } from "react-router-dom";
|
2018-07-12 08:23:24 +02:00
|
|
|
import Footer from "../components/Footer";
|
2018-07-02 14:50:13 +02:00
|
|
|
|
2018-07-12 08:23:24 +02:00
|
|
|
import type { Me } from "../types/me";
|
2018-07-02 14:50:13 +02:00
|
|
|
|
|
|
|
|
type Props = {
|
2018-07-12 08:23:24 +02:00
|
|
|
me: Me
|
2018-07-11 14:59:01 +02:00
|
|
|
};
|
2018-07-02 14:50:13 +02:00
|
|
|
|
|
|
|
|
class Main extends React.Component<Props> {
|
|
|
|
|
render() {
|
2018-07-12 08:23:24 +02:00
|
|
|
const { me } = this.props;
|
2018-07-02 14:50:13 +02:00
|
|
|
return (
|
2018-07-12 08:23:24 +02:00
|
|
|
<div>
|
2018-07-02 14:50:13 +02:00
|
|
|
<Switch>
|
2018-07-04 09:55:02 +02:00
|
|
|
<Route exact path="/" component={Repositories} />
|
2018-07-11 14:59:01 +02:00
|
|
|
<Route path="/users" component={Users} />
|
2018-07-02 14:50:13 +02:00
|
|
|
</Switch>
|
2018-07-12 08:23:24 +02:00
|
|
|
<Footer me={me} />
|
2018-07-02 14:50:13 +02:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-12 08:23:24 +02:00
|
|
|
export default withRouter(Main);
|