mirror of
https://github.com/wassname/talk.git
synced 2026-07-23 13:10:20 +08:00
Use router for 'moderate all' link and only show when necessary
This commit is contained in:
@@ -204,6 +204,7 @@ export default class Moderation extends Component {
|
||||
rejectComment={props.rejectComment} />
|
||||
)}
|
||||
<StorySearch
|
||||
assetId={assetId}
|
||||
moderation={this.props.moderation}
|
||||
closeSearch={this.closeSearch}
|
||||
storySearchChange={this.props.storySearchChange}
|
||||
|
||||
@@ -49,13 +49,14 @@
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.cta a {
|
||||
.cta > a {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
height: 50px;
|
||||
box-sizing: border-box;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -38,9 +38,11 @@ const StorySearch = (props) => {
|
||||
</Button>
|
||||
</div>
|
||||
<div className={styles.results}>
|
||||
<p className={styles.cta}>
|
||||
<a href={'moderate/all'}>Moderate comments on All Stories</a>
|
||||
</p>
|
||||
{props.assetId &&
|
||||
<div className={styles.cta}>
|
||||
<a onClick={props.goToModerateAll}>Moderate comments on All Stories</a>
|
||||
</div>
|
||||
}
|
||||
<div className={styles.storyList}>
|
||||
|
||||
{
|
||||
|
||||
@@ -45,11 +45,18 @@ class StorySearchContainer extends React.Component {
|
||||
closeSearch();
|
||||
}
|
||||
|
||||
goToModerateAll = () => {
|
||||
const {router, closeSearch} = this.props;
|
||||
router.push('/admin/moderate/all');
|
||||
closeSearch();
|
||||
}
|
||||
|
||||
render () {
|
||||
return (
|
||||
<StorySearch
|
||||
search={this.search}
|
||||
goToStory={this.goToStory}
|
||||
goToModerateAll={this.goToModerateAll}
|
||||
handleEsc={this.handleEsc}
|
||||
handleEnter={this.handleEnter}
|
||||
searchValue={this.state.searchValue}
|
||||
|
||||
Reference in New Issue
Block a user