diff options
author | Dessalines <happydooby@gmail.com> | 2019-06-01 15:46:40 -0700 |
---|---|---|
committer | Dessalines <happydooby@gmail.com> | 2019-06-01 15:46:40 -0700 |
commit | f0e5cce51f5c5aca7d71cdb709b7e2525e49ba63 (patch) | |
tree | a2796c1bff05596085d87181480ec7533eef0820 | |
parent | 9aadf200ffb7b36276d23453647e37a66a04b729 (diff) |
Disable create post button when community is deleted or removed.
- Fixes #167
-rw-r--r-- | ui/src/components/sidebar.tsx | 4 |
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> |