Merge branch 'main' into route-data-refactor
authorabias <abias1122@gmail.com>
Tue, 30 May 2023 00:41:54 +0000 (20:41 -0400)
committerabias <abias1122@gmail.com>
Tue, 30 May 2023 00:41:54 +0000 (20:41 -0400)
1  2 
src/shared/components/post/create-post.tsx

index f43cbb0739761e25a7043f9df0e4c19307364e1f,28418d10ff9d7492c02632e5716810a86e8d19da..684dda2fc3b1a194a8bf67c1e9abc7c62be4dea3
@@@ -76,12 -70,14 +75,12 @@@ export class CreatePost extends Compone
  
      // Only fetch the data if coming from another route
      if (this.isoData.path === this.context.router.route.match.url) {
 -      const communityRes = this.isoData.routeData[0] as
 -        | GetCommunityResponse
 -        | undefined;
 +      const { communityResponse } = this.isoData.routeData;
  
 -      if (communityRes) {
 +      if (communityResponse) {
          const communityChoice: Choice = {
-           label: communityResponse.community_view.community.name,
 -          label: communityRes.community_view.community.title,
 -          value: communityRes.community_view.community.id.toString(),
++          label: communityResponse.community_view.community.title,
 +          value: communityResponse.community_view.community.id.toString(),
          };
  
          this.state = {