mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-10 17:12:48 +00:00
expanded permissions functionality - added packr for bundling static assets
This commit is contained in:
@@ -4,15 +4,9 @@ import jwt_decode from 'jwt-decode';
|
||||
import { StorageService } from '../../services';
|
||||
import './Navbar.scss';
|
||||
|
||||
let oauthUrl: string;
|
||||
const baseUrl = window.location.origin + '/oauth';
|
||||
|
||||
if (!process.env.NODE_ENV) {
|
||||
// dev
|
||||
oauthUrl = `https://discordapp.com/api/oauth2/authorize?client_id=410818759746650140&redirect_uri=https%3A%2F%2Flocalhost%2Foauth&response_type=code&scope=identify%20guilds`;
|
||||
} else {
|
||||
// prod
|
||||
oauthUrl = `https://discordapp.com/api/oauth2/authorize?client_id=271998875802402816&redirect_uri=https%3A%2F%2Fcashdiscord.com%2Foauth&response_type=code&scope=identify%20guilds%20email`;
|
||||
}
|
||||
const oauthUrl = `https://discordapp.com/api/oauth2/authorize?client_id=410818759746650140&redirect_uri=${baseUrl}&response_type=code&scope=identify%20guilds`;
|
||||
|
||||
interface Props {}
|
||||
|
||||
@@ -47,7 +41,7 @@ export class Navbar extends React.Component<Props, State> {
|
||||
render() {
|
||||
return (
|
||||
<div className="Navbar">
|
||||
<div className="Navbar__header">Cash</div>
|
||||
<div className="Navbar__header">Sound Bot</div>
|
||||
<NavLink exact to="/" className="Navbar__item" activeClassName="Navbar__item--active">
|
||||
Home
|
||||
</NavLink>
|
||||
|
||||
@@ -34,6 +34,7 @@ export class Stats extends Component<any, IState> {
|
||||
return { username: k, count: v };
|
||||
})
|
||||
.orderBy(v => v.count, 'desc')
|
||||
.slice(0, 10)
|
||||
.value();
|
||||
|
||||
this.setState({ data });
|
||||
@@ -61,8 +62,8 @@ export class Stats extends Component<any, IState> {
|
||||
return (
|
||||
<div className="content">
|
||||
<div className="card" style={{ maxWidth: '1000px' }}>
|
||||
<div className="card__header">Shitposts</div>
|
||||
<HorizontalBar data={data} height={500} />
|
||||
<div className="card__header">Posts containing links</div>
|
||||
<HorizontalBar data={data} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user