diff --git a/space/components/issues/navbar/issue-board-view.tsx b/space/components/issues/navbar/issue-board-view.tsx index 2bb8b671c..d8ed5ef07 100644 --- a/space/components/issues/navbar/issue-board-view.tsx +++ b/space/components/issues/navbar/issue-board-view.tsx @@ -40,32 +40,31 @@ export const NavbarIssueBoardView: FC = observer((pro return ( <> - {issueLayoutViews && - Object.keys(issueLayoutViews).map((key: string) => { - const layoutKey = key as TIssueLayout; - if (layoutOptions[layoutKey]) { - return ( -
{ + const layoutKey = key as TIssueLayout; + if (layoutOptions[layoutKey]) { + return ( +
handleCurrentBoardView(layoutKey)} + title={layoutKey} + > + handleCurrentBoardView(layoutKey)} - title={layoutKey} > - - {issueLayoutViews[layoutKey]?.icon} - -
- ); - } - })} + {issueLayoutViews[layoutKey]?.icon} + +
+ ); + } + })} ); }); diff --git a/space/store/publish/publish_list.store.ts b/space/store/publish/publish_list.store.ts index 680adb809..91db19f7a 100644 --- a/space/store/publish/publish_list.store.ts +++ b/space/store/publish/publish_list.store.ts @@ -38,13 +38,15 @@ export class PublishListStore implements IPublishListStore { */ fetchPublishSettings = async (anchor: string) => { try { - const publishSettings = await this.publishService.fetchPublishSettings(anchor); + const response = await this.publishService.fetchPublishSettings(anchor); runInAction(() => { - if (publishSettings.anchor) - set(this.publishMap, [publishSettings.anchor], new PublishStore(this.store, publishSettings)); + if (response.anchor && response.view_props) { + this.store.issueFilter.updateLayoutOptions(response?.view_props); + set(this.publishMap, [response.anchor], new PublishStore(this.store, response)); + } }); - return publishSettings; + return response; } catch (error) { throw error; }