This repository has been archived by the owner on Nov 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
683 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
|
||
import React from "react"; | ||
|
||
export default React.createClass({ | ||
render: function() { | ||
return ( | ||
<div className="alert alert-warning"> | ||
<p><strong>{this.props.title}</strong></p> | ||
<div>{this.props.children}</div> | ||
</div> | ||
); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"use strict"; | ||
|
||
// Load 6to5 polyfills http://6to5.org/docs/usage/polyfill/ | ||
import "6to5/polyfill"; | ||
|
||
import React from "react/addons"; | ||
import DocBrown from "docbrown"; | ||
import { ArticleActions, stores } from "../flux"; | ||
|
||
import Alert from "./Alert"; | ||
import ArticleForm from "./ArticleForm"; | ||
import ArticleList from "./ArticleList"; | ||
|
||
export default React.createClass({ | ||
mixins: [DocBrown.storeMixin(stores.getter("articleStore"))], | ||
|
||
componentDidMount: function() { | ||
ArticleActions.list(); | ||
}, | ||
|
||
renderError: function() { | ||
if (!this.state.error) return; | ||
return ( | ||
<Alert title="Error"> | ||
<p>{this.state.error.message}</p> | ||
</Alert> | ||
); | ||
}, | ||
|
||
render: function() { | ||
return ( | ||
<div className="container-fluid"> | ||
<h1>Readinglist</h1> | ||
{this.renderError()} | ||
<div className="row"> | ||
<div className="col-md-3"> | ||
<ArticleList articles={this.state.articles} /> | ||
</div> | ||
<div className="col-md-9"> | ||
<ArticleForm /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
}); |
Oops, something went wrong.