[WEB-1724] fix: initial pages list loading. (#4939)
* [WEB-1724] fix: inital page loading. * chore: update getPageById action. * fix: lint error
This commit is contained in:
parent
a3a1e9cf9e
commit
4e97fcd776
7 changed files with 18 additions and 14 deletions
|
|
@ -31,7 +31,7 @@ export const InboxIssueRoot: FC<TInboxIssueRoot> = observer((props) => {
|
|||
useEffect(() => {
|
||||
if (!inboxAccessible || !workspaceSlug || !projectId) return;
|
||||
if (navigationTab && navigationTab !== currentTab) {
|
||||
handleCurrentTab(navigationTab);
|
||||
handleCurrentTab(workspaceSlug, projectId, navigationTab);
|
||||
} else {
|
||||
fetchInboxIssues(workspaceSlug.toString(), projectId.toString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export const InboxSidebar: FC<IInboxSidebarProps> = observer((props) => {
|
|||
)}
|
||||
onClick={() => {
|
||||
if (currentTab != option?.key) {
|
||||
handleCurrentTab(option?.key);
|
||||
handleCurrentTab(workspaceSlug, projectId, option?.key);
|
||||
router.push(`/${workspaceSlug}/projects/${projectId}/inbox?currentTab=${option?.key}`);
|
||||
}
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@ export const PagesListView: React.FC<TPageView> = observer((props) => {
|
|||
// store hooks
|
||||
const { isAnyPageAvailable, getAllPages } = useProjectPages();
|
||||
// fetching pages list
|
||||
useSWR(projectId ? `PROJECT_PAGES_${projectId}` : null, projectId ? () => getAllPages(pageType) : null);
|
||||
useSWR(
|
||||
projectId ? `PROJECT_PAGES_${projectId}` : null,
|
||||
projectId ? () => getAllPages(workspaceSlug, projectId, pageType) : null
|
||||
);
|
||||
|
||||
// pages loader
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue