mirror of
https://github.com/wassname/talk.git
synced 2026-07-07 17:03:56 +08:00
use plugin CommentHistory component
This commit is contained in:
@@ -13,8 +13,6 @@ export const ADD_ITEM = 'ADD_ITEM';
|
||||
export const UPDATE_ITEM = 'UPDATE_ITEM';
|
||||
export const APPEND_ITEM_ARRAY = 'APPEND_ITEM_ARRAY';
|
||||
|
||||
/* Item Actions */
|
||||
|
||||
/**
|
||||
* Action creators
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
import React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import styles from './CommentHistory.css';
|
||||
|
||||
class CommentHistory extends React.Component {
|
||||
render () {
|
||||
return (
|
||||
<div className={styles.header}>
|
||||
<h1>Comment History</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
config: state.config.toJS(),
|
||||
@@ -9,12 +21,4 @@ const mapStateToProps = state => {
|
||||
};
|
||||
};
|
||||
|
||||
class CommentHistory extends React.Component {
|
||||
render () {
|
||||
return (
|
||||
<div>Comment History</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(CommentHistory);
|
||||
|
||||
@@ -6,10 +6,12 @@ import {saveBio} from 'coral-framework/actions/user';
|
||||
import BioContainer from './BioContainer';
|
||||
import NotLoggedIn from '../components/NotLoggedIn';
|
||||
import {TabBar, Tab, TabContent} from '../../coral-ui';
|
||||
import CommentHistory from '../components/CommentHistory';
|
||||
import CommentHistory from 'coral-plugin-history/CommentHistory';
|
||||
import SettingsHeader from '../components/SettingsHeader';
|
||||
import RestrictedContent from 'coral-framework/components/RestrictedContent';
|
||||
|
||||
import {fetchCommentsByUserId} from 'coral-framework/actions/items';
|
||||
|
||||
class SignInContainer extends Component {
|
||||
constructor (props) {
|
||||
super(props);
|
||||
@@ -56,7 +58,7 @@ const mapStateToProps = () => ({
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
saveBio: (user_id, formData) => dispatch(saveBio(user_id, formData)),
|
||||
getHistory: () => dispatch(),
|
||||
fetchCommentsByUserId: userId => dispatch(fetchCommentsByUserId(userId))
|
||||
});
|
||||
|
||||
export default connect(
|
||||
|
||||
Reference in New Issue
Block a user