summaryrefslogtreecommitdiffstats
path: root/ui/src/components
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-06-01 15:46:40 -0700
committerDessalines <tyhou13@gmx.com>2019-06-01 15:46:40 -0700
commit842c8b0885142ea881729bdb1cbe01e5e83e6da5 (patch)
tree7a4d8983279958ebed1a0e8e731e26eff5765ecf /ui/src/components
parent8c85f0cb62af57a730a444fd46e3c8e4c7521fce (diff)
Disable create post button when community is deleted or removed.
- Fixes #167
Diffstat (limited to 'ui/src/components')
-rw-r--r--ui/src/components/sidebar.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/src/components/sidebar.tsx b/ui/src/components/sidebar.tsx
index 6532bc05..d36d962c 100644
--- a/ui/src/components/sidebar.tsx
+++ b/ui/src/components/sidebar.tsx
@@ -115,8 +115,8 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
<li class="list-inline-item"><Link class="text-info" to={`/u/${mod.user_name}`}>{mod.user_name}</Link></li>
)}
</ul>
- <Link class="btn btn-sm btn-secondary btn-block mb-3"
- to={`/create_post/c/${community.name}`}>Create a Post</Link>
+ <Link class={`btn btn-sm btn-secondary btn-block mb-3 ${(community.deleted || community.removed) && 'no-click'}`}
+ to={`/create_post/c/${community.name}`}>Create a Post</Link>
<div>
{community.subscribed
? <button class="btn btn-sm btn-secondary btn-block mb-3" onClick={linkEvent(community.id, this.handleUnsubscribe)}>Unsubscribe</button>