Only for admins
This commit is contained in:
@ -9,6 +9,7 @@ import Flex from 'shared/components/Flex';
|
||||
type Props = {
|
||||
id: string,
|
||||
children: React.Node,
|
||||
disabled?: boolean,
|
||||
};
|
||||
|
||||
type State = {
|
||||
@ -31,7 +32,7 @@ class Tip extends React.Component<Props, State> {
|
||||
|
||||
render() {
|
||||
const { children } = this.props;
|
||||
if (this.state.isHidden) return null;
|
||||
if (this.props.disabled || this.state.isHidden) return null;
|
||||
|
||||
return (
|
||||
<Wrapper align="center">
|
||||
|
@ -29,8 +29,11 @@ class Dashboard extends React.Component<Props> {
|
||||
|
||||
return (
|
||||
<CenteredContent>
|
||||
{auth.team.subdomain && <TipInvite team={auth.team} />}
|
||||
<PageTitle title="Home" />
|
||||
<TipInvite
|
||||
team={auth.team}
|
||||
disabled={!auth.team.subdomain || !auth.user.isAdmin}
|
||||
/>
|
||||
<h1>Home</h1>
|
||||
<Tabs>
|
||||
<Tab to="/dashboard" exact>
|
||||
|
Reference in New Issue
Block a user