diff --git a/ui/src/components/create-post.tsx b/ui/src/components/create-post.tsx index 1958be72d..fdee01f66 100644 --- a/ui/src/components/create-post.tsx +++ b/ui/src/components/create-post.tsx @@ -26,7 +26,9 @@ export class CreatePost extends Component { } get prevCommunityName(): string { - if (this.props.location.state) { + if (this.props.match.params.name) { + return this.props.match.params.name; + } else if (this.props.location.state) { let lastLocation = this.props.location.state.prevPath; if (lastLocation.includes("/c/")) { return lastLocation.split("/c/")[1]; diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 1ec016ea6..ac43b1d9f 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -136,6 +136,8 @@ export class Main extends Component { } + Create a Community {this.sidebar()} } diff --git a/ui/src/components/sidebar.tsx b/ui/src/components/sidebar.tsx index d14ad68cc..8d1459d56 100644 --- a/ui/src/components/sidebar.tsx +++ b/ui/src/components/sidebar.tsx @@ -117,10 +117,12 @@ export class Sidebar extends Component {
{community.subscribed - ? - : + ? + : }
+ Create a Post {community.description &&

diff --git a/ui/src/index.tsx b/ui/src/index.tsx index b744ac7d2..04160a9fa 100644 --- a/ui/src/index.tsx +++ b/ui/src/index.tsx @@ -41,6 +41,7 @@ class Index extends Component { +