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