Disable create post button when community is deleted or removed.

- Fixes #167
This commit is contained in:
Dessalines 2019-06-01 15:46:40 -07:00
parent 9aadf200ff
commit f0e5cce51f

View file

@ -115,7 +115,7 @@ 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"
<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