chore: implemented autorun for inbox issues (#2470)
* fix: inbox issues not loading * chore: implemented autorun for inbox issues * chore: don't revalidate inbox list
This commit is contained in:
parent
3197dd484c
commit
baa2621fe2
6 changed files with 50 additions and 20 deletions
|
|
@ -19,7 +19,7 @@ const ProjectInbox: NextPage = () => {
|
|||
const router = useRouter();
|
||||
const { workspaceSlug, projectId, inboxId } = router.query;
|
||||
|
||||
const { inboxIssues: inboxIssuesStore, inboxFilters: inboxFiltersStore, project: projectStore } = useMobxStore();
|
||||
const { inboxFilters: inboxFiltersStore, project: projectStore } = useMobxStore();
|
||||
|
||||
const projectDetails =
|
||||
workspaceSlug && projectId
|
||||
|
|
@ -27,12 +27,9 @@ const ProjectInbox: NextPage = () => {
|
|||
: undefined;
|
||||
|
||||
useSWR(
|
||||
workspaceSlug && projectId && inboxId ? `REVALIDATE_INBOX_${inboxId.toString()}` : null,
|
||||
workspaceSlug && projectId && inboxId ? `INBOX_FILTERS_${inboxId.toString()}` : null,
|
||||
workspaceSlug && projectId && inboxId
|
||||
? async () => {
|
||||
await inboxFiltersStore.fetchInboxFilters(workspaceSlug.toString(), projectId.toString(), inboxId.toString());
|
||||
await inboxIssuesStore.fetchInboxIssues(workspaceSlug.toString(), projectId.toString(), inboxId.toString());
|
||||
}
|
||||
? () => inboxFiltersStore.fetchInboxFilters(workspaceSlug.toString(), projectId.toString(), inboxId.toString())
|
||||
: null
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue