Skip to content

Commit

Permalink
fix: add scroll (#1919)
Browse files Browse the repository at this point in the history
* fix: streamline timeline creation

* fix

* streamline ui

* state sharing

* fix

* format fix

* lint fix

* fix

* format fix

* Update UserMenu.tsx

* Update post.ts

* Update ExperienceListRightBar.tsx
  • Loading branch information
RiXelanya authored Dec 3, 2023
1 parent e3414fe commit 9f2440d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ExperienceList/ExperienceListRightBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const ExperienceListRightBar: React.FC<ExperienceListProps> = props => {
onSubscribe={onSubscribe}
onClone={onClone}
menuDrawer={menuDrawer}
postCount={item.newPostCount !== 0}
postCount={false}
/>
</div>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserMenu/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const UserMenu: React.FC<UserMenuProps> = props => {
<TabsComponent<UserMenuTabs>
tabs={tabs}
selected={activeTab}
scrollButtons="auto"
scrollButtons="on"
variant="scrollable"
onChangeTab={setActiveTab}
size="small"
Expand Down
10 changes: 10 additions & 0 deletions src/lib/api/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ export const getPost = async (
return post.createdBy === fields.owner;
});
}
if (data.data.length === 0 && params.experienceId) {
const { data } = await MyriadAPI().request<PostList>({
url: `/experience/${params.experienceId}/posts`,
method: 'GET',
params: {
filter: filterParams,
},
});
return data;
}

return data;
};
Expand Down

0 comments on commit 9f2440d

Please sign in to comment.