Skip to content

Commit

Permalink
Setup router
Browse files Browse the repository at this point in the history
  • Loading branch information
minodisk committed Feb 26, 2016
1 parent 9a0730f commit 9c72500
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 2 deletions.
60 changes: 59 additions & 1 deletion server/static/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
var socket_1 = __webpack_require__(267);
var files_1 = __webpack_require__(271);
var App_1 = __webpack_require__(272);
var routes = (React.createElement(react_router_1.Route, {path: "/", component: App_1.default}));
var Markdown_1 = __webpack_require__(417);
var NotFound_1 = __webpack_require__(418);
var routes = (React.createElement(react_router_1.Route, {path: "/", component: App_1.default}, React.createElement(react_router_1.Route, {path: "**/*.md", component: Markdown_1.default}), React.createElement(react_router_1.Route, {path: "*", component: NotFound_1.default})));
var loggerMiddleware = createLogger();
var store = redux_1.compose(redux_1.applyMiddleware(thunkMiddleware, loggerMiddleware), redux_router_1.reduxReactRouter({
routes: routes,
Expand Down Expand Up @@ -60733,6 +60735,62 @@

module.exports = __webpack_require__.p + "a37b0c01c0baf1888ca812cc0508f6e2.ttf";

/***/ },
/* 417 */
/***/ function(module, exports, __webpack_require__) {

"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var React = __webpack_require__(1);
var styles = __webpack_require__(408);
;
;
var Markdown = (function (_super) {
__extends(Markdown, _super);
function Markdown() {
_super.apply(this, arguments);
}
Markdown.prototype.render = function () {
return (React.createElement("p", null, "Markdown"));
};
return Markdown;
}(React.Component));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Markdown;


/***/ },
/* 418 */
/***/ function(module, exports, __webpack_require__) {

"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var React = __webpack_require__(1);
var styles = __webpack_require__(408);
;
;
var NotFound = (function (_super) {
__extends(NotFound, _super);
function NotFound() {
_super.apply(this, arguments);
}
NotFound.prototype.render = function () {
return (React.createElement("p", null, "NotFound"));
};
return NotFound;
}(React.Component));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = NotFound;


/***/ }
/******/ ]);
//# sourceMappingURL=bundle.js.map
2 changes: 1 addition & 1 deletion server/static/bundle.js.map

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions server/static/src/components/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import * as React from 'react';

const styles = require('../styles/content.css')

interface Props {
};
interface State {
};

export default class Markdown extends React.Component<Props, State> {
render() {
return (
<p>Markdown</p>
);
}
}
16 changes: 16 additions & 0 deletions server/static/src/components/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import * as React from 'react';

const styles = require('../styles/content.css')

interface Props {
};
interface State {
};

export default class NotFound extends React.Component<Props, State> {
render() {
return (
<p>NotFound</p>
);
}
}
4 changes: 4 additions & 0 deletions server/static/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ import { rootReducer } from './reducers/rootReducer';
import { openSocket } from './actions/socket'
import { fetchFiles } from './actions/files'
import App from './containers/App';
import Markdown from './components/Markdown'
import NotFound from './components/NotFound'

const routes = (
<Route path="/" component={App}>
<Route path="**/*.md" component={Markdown}/>
<Route path="*" component={NotFound}/>
</Route>
)

Expand Down

0 comments on commit 9c72500

Please sign in to comment.