mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 05:53:30 +08:00
saving my place
This commit is contained in:
@@ -22,6 +22,7 @@ const routes = (
|
||||
<Route path='dashboard' component={Dashboard} />
|
||||
<Route path='moderate' component={ModerationContainer} />
|
||||
<Route path='moderate/:id' component={ModerationContainer} />
|
||||
<Route path='dashboard' component={Dashboard} />
|
||||
</Route>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
.Dashboard {
|
||||
display: flex;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.widget {
|
||||
margin-top: 10px;
|
||||
flex: 1;
|
||||
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
|
||||
margin-right: 10px;
|
||||
padding: 15px;
|
||||
|
||||
}
|
||||
|
||||
.widget:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.heading {
|
||||
margin: 0;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -1,11 +1,24 @@
|
||||
import React from 'react';
|
||||
import {compose} from 'react-apollo';
|
||||
import {mostFlags} from 'coral-admin/src/graphql/queries';
|
||||
import styles from './Dashboard.css';
|
||||
|
||||
class Dashboard extends React.Component {
|
||||
render () {
|
||||
return (
|
||||
<div>Dashboard</div>
|
||||
<div className={styles.Dashboard}>
|
||||
<div className={`${styles.flagWidget} ${styles.widget}`}>
|
||||
<h2 className={styles.heading}>Top Ten Articles with the most flagged comments</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Article</th><th>Flags</th></tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div className={`${styles.likeWidget} ${styles.widget}`}>
|
||||
<h2 className={styles.heading}>Top ten comments with the most likes</h2>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
query mostFlags {
|
||||
metric
|
||||
metric {
|
||||
id
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user